From 6ff69934c0ecc0141ebe918d8af439f0fca174ba Mon Sep 17 00:00:00 2001 From: Tobias Hamann <tobias.hamann@rwth-aachen.de> Date: Thu, 27 Feb 2025 16:54:28 +0100 Subject: [PATCH] Functions now completely empty to be used by endusers for their special functions. Contents were placed in corresponding files --- format/WZLTemplate.cls | 5 + .../SET_DocumentProperties.tex | 32 ++++- .../SET_FiguresAndTables.tex | 6 + format/WZLTemplate_files/SET_SpecialBoxes.tex | 55 ++++++++ .../WZLTemplate_files/SET_UsefulPackages.tex | 3 + format/WZLTemplate_files/Unused.tex | 62 ++++++++- format/custom_packages.tex | 26 +--- format/functions.tex | 125 +----------------- main.tex | 2 +- 9 files changed, 164 insertions(+), 152 deletions(-) create mode 100644 format/WZLTemplate_files/SET_SpecialBoxes.tex diff --git a/format/WZLTemplate.cls b/format/WZLTemplate.cls index 404375c..9633609 100644 --- a/format/WZLTemplate.cls +++ b/format/WZLTemplate.cls @@ -176,6 +176,9 @@ %%----SET UP HYPERLINKS---- \input{format/WZLTemplate_files/SET_Hyperlinks.tex} +%%----SET UP Abstracts, Definitions and Theorems---- +\input{format/WZLTemplate_files/SET_SpecialBoxes.tex} + %%----SET UP BIBLIOGRAPHY---- \input{format/WZLTemplate_files/SET_Bibliography.tex} @@ -185,6 +188,8 @@ %%----MISCELLANEOUS---- \input{format/WZLTemplate_files/SET_Miscellaneous.tex} + + %% ----SET UP Unused packages---- % \input{format/WZLTemplate_files/Unused.tex} diff --git a/format/WZLTemplate_files/SET_DocumentProperties.tex b/format/WZLTemplate_files/SET_DocumentProperties.tex index 64753c5..a92501f 100644 --- a/format/WZLTemplate_files/SET_DocumentProperties.tex +++ b/format/WZLTemplate_files/SET_DocumentProperties.tex @@ -130,7 +130,37 @@ \RequirePackage{microtype} \RequirePackage{fontspec} \newfontfamily\arialfont[NFSSFamily=arial]{Arial} - \RequirePackage{anyfontsize} + \RequirePackage{anyfontsize} + % Draconic + \newfontfamily\Iokharic[Path=./format/fonts/Iokharic/]{Iokharic.ttf} + +%% HYPHENATION + \usepackage[normalem]{ulem} + % TODO + \righthyphenmin=4 + \lefthyphenmin=4 + + +%% DOCUMENT STARTUP + %% Start frontmatter --> roman page numbers and chapter numbers + \newcommand{\startfront}{ + \pagenumbering{roman} + \pagestyle{fancy} + \renewcommand{\thechapter}{\Roman{chapter}} + \newcounter{romancounter} + \stepcounter{romancounter} + \setlength{\cftchapnumwidth}{2em} + } + + %% Start of main text + \newcommand{\startmain} + { + \pagenumbering{arabic} + \setcounter{page}{1} + \setcounter{chapter}{0} + \setcounter{section}{0} + \renewcommand{\thechapter}{\arabic{chapter}} + } diff --git a/format/WZLTemplate_files/SET_FiguresAndTables.tex b/format/WZLTemplate_files/SET_FiguresAndTables.tex index 4153e0e..31762b7 100644 --- a/format/WZLTemplate_files/SET_FiguresAndTables.tex +++ b/format/WZLTemplate_files/SET_FiguresAndTables.tex @@ -74,6 +74,12 @@ %% RWTH-TABLES + % TODO + \newlength{\myleftsep} + \setlength{\myleftsep}{3pt} + \newlength{\myrightsep} + \setlength{\myrightsep}{3pt} + % TODO \NewTblrEnviron{tblrrwth} \SetTblrOuter[tblrrwth]{} diff --git a/format/WZLTemplate_files/SET_SpecialBoxes.tex b/format/WZLTemplate_files/SET_SpecialBoxes.tex new file mode 100644 index 0000000..a90753b --- /dev/null +++ b/format/WZLTemplate_files/SET_SpecialBoxes.tex @@ -0,0 +1,55 @@ + + +% TODO +\newcommand{\infocolorbox}[2][\chaptercolor]{% + \begin{tcolorbox}[colback=#1!5!white, colframe=#1!50!white] + #2 + \end{tcolorbox} +} + +% TODO +\newenvironment{sectionabstract}[1]{ + \infocolorbox{#1} + \renewcommand{\arraystretch}{1.25} + \begin{adjustbox}{max width=\textwidth} + \begin{tabular}{@{}>{\bfseries}p{0.25\linewidth}>{\arraybackslash}p{0.75\linewidth}@{}} % Two columns in the table with no inter-column space at the end + } + { + \end{tabular} + \end{adjustbox}\\[8pt] % Adjust the default vertical spacing here +} + + +% Summary Boxes +\usepackage{tcolorbox} +\tcbuselibrary{theorems} + +\makeatletter +\newtcbtheorem{Summary}{\bfseries Zusammenfassung}{ + code={\edef\@currentlabelname{#2}} + %enhanced, + %drop shadow={black!50!white}, + %coltitle=black, + %top=0.3in, + %attach boxed title to top left= + % {xshift=1.5em, + % yshift=-\tcboxedtitleheight/2}, + %boxed title style={size=small,colback=pink} +}{summary} +\makeatother + +\makeatletter +\newtcbtheorem{Definition}{\bfseries Definition}{ + code={\edef\@currentlabelname{#2}}, + % enhanced, + sharp corners, + %drop shadow={black!50!white}, + coltitle=black, + colframe=black!20!white, + %top=0.3in, + %attach boxed title to top left= + % {xshift=1.5em, + % yshift=-\tcboxedtitleheight/2}, + colback=white +}{definition} +\makeatother \ No newline at end of file diff --git a/format/WZLTemplate_files/SET_UsefulPackages.tex b/format/WZLTemplate_files/SET_UsefulPackages.tex index 1596077..ec1583f 100644 --- a/format/WZLTemplate_files/SET_UsefulPackages.tex +++ b/format/WZLTemplate_files/SET_UsefulPackages.tex @@ -37,6 +37,9 @@ % The maximum number of columns in a matrix is determined by the counter MaxMatrixCols \setcounter{MaxMatrixCols}{32} + % Set Referencename for equations + \def\equationautorefname{eq.} + %% TODO-Notes %% Use \todo{} for inline-todo notes diff --git a/format/WZLTemplate_files/Unused.tex b/format/WZLTemplate_files/Unused.tex index 0ba8477..c10d96e 100644 --- a/format/WZLTemplate_files/Unused.tex +++ b/format/WZLTemplate_files/Unused.tex @@ -23,4 +23,64 @@ % coloured and framed text boxes with a heading line \RequirePackage{tcolorbox} -\setlength{\fboxsep}{1pt} \ No newline at end of file +\setlength{\fboxsep}{1pt} + +% TODO +\newcommand{\markerbox}[2]{% + \begingroup% + \setlength{\fboxrule}{2pt}% + \setlength{\fboxsep}{0.5pt}% + \fcolorbox{#1}{white}{\textbf{#2}}% + \endgroup% +} + + +% -------------------- brauchen wir folgendes noch? + +% Create custom lengths +\newcommand{\deflen}[2]{% + \expandafter\newlength\csname #1\endcsname + \expandafter\setlength\csname #1\endcsname{#2}% +} + +% Römische Zahlen +\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} +\newcommand{\lowroman}[1]{\romannumeral#1\relax} + + + +\newif\ifrevision +\newif\ifdeletion + +\revisiontrue +\deletiontrue + +\ifrevision +\newcommand\revOne[1]{\textcolor{BrickRed}{#1}} +\newcommand\revTwo[1]{\textcolor{NavyBlue}{#1}} +\newcommand\rev[1]{\textcolor{Green}{#1}} +\ifdeletion +\newcommand\del[1]{\textcolor{Red}{\sout{#1}}} +\else +\newcommand\del[1]{} +\fi +\else +\newcommand\revOne[1]{#1} +\newcommand\revTwo[1]{#1} +\newcommand\rev[1]{#1} +\newcommand\del[1]{} +\fi + +\newcommand\todoRevOne[1]{\todo[author=Review 1,color=BrickRed]{#1}} +\newcommand\todoRevTwo[1]{\todo[author=Review 2,color=NavyBlue]{#1}} +\newcommand\todohmt[1]{\todo[author=hmt,color=red]{#1}} + + +\newcounter{hmtcomment} +\newcommand{\hmtcomment}[1]{% + \refstepcounter{hmtcomment}% + {% + \setstretch{0.7}% spacing + \todo[color={red!60!},size=\small]{% + \textbf{Comment~[Tobias~\thehmtcomment]:} #1}% + }} diff --git a/format/custom_packages.tex b/format/custom_packages.tex index ea6f72f..c8c16db 100644 --- a/format/custom_packages.tex +++ b/format/custom_packages.tex @@ -70,27 +70,6 @@ \xpatchcmd{\@todo}{\setkeys{todonotes}{#1}}{\setkeys{todonotes}{inline,#1}}{}{} \makeatother -% Summary Boxes -\usepackage{tcolorbox} -\tcbuselibrary{theorems} - -\makeatletter -\newtcbtheorem{thm}{Theorem}{code={\edef\@currentlabelname{#2}}}{thm} -%\newtcbtheorem{thm}{Theorem}{code={\NR@gettitle{#2}}}{thm} % alternatively, if nameref is loaded -\makeatother - -\newtcbtheorem{Summary}{\bfseries Zusammenfassung}{ - code={\edef\@currentlabelname{#2}} - %enhanced, - %drop shadow={black!50!white}, - %coltitle=black, - %top=0.3in, - %attach boxed title to top left= - % {xshift=1.5em, - % yshift=-\tcboxedtitleheight/2}, - %boxed title style={size=small,colback=pink} -}{summary} - % Fix a bug with PDF Images included %\pdfminorversion=7 @@ -112,11 +91,8 @@ % Nach den Kapiteln % \renewcommand{\chaptercolor}{RWTHBlau100} -% Draconic -\newfontfamily\Iokharic[Path=./format/fonts/Iokharic/]{Iokharic.ttf} % \usepackage{ifthen} \usepackage{todonotes} \usepackage{svg} -\svgsetup{inkscapelatex=false} -\usepackage[normalem]{ulem} \ No newline at end of file +\svgsetup{inkscapelatex=false} \ No newline at end of file diff --git a/format/functions.tex b/format/functions.tex index 4308423..0cebe5a 100644 --- a/format/functions.tex +++ b/format/functions.tex @@ -2,127 +2,4 @@ %% let there be functions -%% Start frontmatter --> roman page numbers and chapter numbers -\newcommand{\startfront}{ - \pagenumbering{roman} - \pagestyle{fancy} - \renewcommand{\thechapter}{\Roman{chapter}} - \newcounter{romancounter} - \stepcounter{romancounter} - \setlength{\cftchapnumwidth}{2em} -} - -%% Start of main text -\newcommand{\startmain} -{ - \pagenumbering{arabic} - \setcounter{page}{1} - \setcounter{chapter}{0} - \setcounter{section}{0} - \renewcommand{\thechapter}{\arabic{chapter}} -} - - - -% TODO -\newcommand{\markerbox}[2]{% - \begingroup% - \setlength{\fboxrule}{2pt}% - \setlength{\fboxsep}{0.5pt}% - \fcolorbox{#1}{white}{\textbf{#2}}% - \endgroup% -} - - -% TODO -\newenvironment{sectionabstract}[1]{ - \infocolorbox{#1} - \renewcommand{\arraystretch}{1.25} - \begin{adjustbox}{max width=\textwidth} - \begin{tabular}{@{}>{\bfseries}p{0.25\linewidth}>{\arraybackslash}p{0.75\linewidth}@{}} % Two columns in the table with no inter-column space at the end - } - { - \end{tabular} - \end{adjustbox}\\[8pt] % Adjust the default vertical spacing here -} - - -% TODO -\newcommand{\infocolorbox}[2][\chaptercolor]{% - \begin{tcolorbox}[colback=#1!5!white, colframe=#1!50!white] - #2 - \end{tcolorbox} -} - - -% TODO -\newlength{\myleftsep} -\setlength{\myleftsep}{3pt} -\newlength{\myrightsep} -\setlength{\myrightsep}{3pt} - - -% TODO -\righthyphenmin=4 -\lefthyphenmin=4 - -% TODO -\def\equationautorefname{eq.} - - - - - - - - - -% -------------------- brauchen wir folgendes noch? - -% Create custom lengths -\newcommand{\deflen}[2]{% - \expandafter\newlength\csname #1\endcsname - \expandafter\setlength\csname #1\endcsname{#2}% -} - -% Römische Zahlen -\newcommand{\uproman}[1]{\uppercase\expandafter{\romannumeral#1}} -\newcommand{\lowroman}[1]{\romannumeral#1\relax} - - - -\newif\ifrevision -\newif\ifdeletion - -\revisiontrue -\deletiontrue - -\ifrevision -\newcommand\revOne[1]{\textcolor{BrickRed}{#1}} -\newcommand\revTwo[1]{\textcolor{NavyBlue}{#1}} -\newcommand\rev[1]{\textcolor{Green}{#1}} -\ifdeletion -\newcommand\del[1]{\textcolor{Red}{\sout{#1}}} -\else -\newcommand\del[1]{} -\fi -\else -\newcommand\revOne[1]{#1} -\newcommand\revTwo[1]{#1} -\newcommand\rev[1]{#1} -\newcommand\del[1]{} -\fi - -\newcommand\todoRevOne[1]{\todo[author=Review 1,color=BrickRed]{#1}} -\newcommand\todoRevTwo[1]{\todo[author=Review 2,color=NavyBlue]{#1}} -\newcommand\todohmt[1]{\todo[author=hmt,color=red]{#1}} - - -\newcounter{hmtcomment} -\newcommand{\hmtcomment}[1]{% - \refstepcounter{hmtcomment}% - {% - \setstretch{0.7}% spacing - \todo[color={red!60!},size=\small]{% - \textbf{Comment~[Tobias~\thehmtcomment]:} #1}% - }} +%% Here, you can create your own functions as needed. diff --git a/main.tex b/main.tex index ca4f559..412c334 100644 --- a/main.tex +++ b/main.tex @@ -40,7 +40,7 @@ \begin{document} %% Define own commands -\include{format/functions} +% \include{format/functions} %% Set up glossary % \input{glossary} -- GitLab