diff --git a/docs/docs.pdf b/docs/docs.pdf index 1c74f52..9f2914b 100644 Binary files a/docs/docs.pdf and b/docs/docs.pdf differ diff --git a/docs/parts/reference.tex b/docs/parts/reference.tex index 3dfd972..355db90 100644 --- a/docs/parts/reference.tex +++ b/docs/parts/reference.tex @@ -29,7 +29,10 @@ \item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors \item \verb|\setcounter{shadeStrength}|\{\textit{number}\} Change the colour saturation of the \verb|\shade| command \item \verb|\setLang|\{\textit{language}\} Change the language. Will automatically load babel in German. Can only be used once and only at the start of the document or in the preamble, as repeated usage leads to undefined behaviour - \item To change the font for the entire document, load the font package using \verb|\usepackage|, then select it by using \verb|\setFont{}|. A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}. You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces. + \item To change the font for the entire document, load the font package using \verb|\usepackage|, with the last occurrence of a font package determining the active one. + Then select the type by using \verb|\setFontType|\textit{\{mono $|$ serif $|$ sans\}}. + A list of fonts is available \color{Cyan}\href{https://www.overleaf.com/learn/latex/Font_typefaces#Reference_guide}{here}\color{black}. + You may change the font only for a specific section, by enclosing \verb|\setFont| and the text that should be written in said typeface in curly braces. \end{itemize} \newpage diff --git a/main/style/style.tex b/main/style/style.tex index 0070c58..a5047fc 100644 --- a/main/style/style.tex +++ b/main/style/style.tex @@ -10,57 +10,68 @@ % Global style configs for tcolorbox (to reduce bloat) \newcommand{\usetcolorboxes}{ - \tcbset{ - mainboxstyle/.style={ - arc=3mm, - colback=red!5!white, - colframe=red!75!black, - colbacktitle=red!75!black, - fonttitle=\bfseries, - enhanced, - attach boxed title to top left={yshift=-2mm,xshift=5mm}, - breakable, - top=0.4cm, - } - } - \tikzset{ - overlaystyle/.style={ - draw=red!75!black, - thick, - fill=red!75!black, - left, - anchor=east, - text=white, - rounded corners=1mm, - font=\bfseries, - xshift=-5mm, - yshift=1mm, - inner xsep=3mm, - inner ysep=1.5mm - } - } + \tcbset{ + mainboxstyle/.style={ + arc=3mm, + colback=red!5!white, + colframe=red!75!black, + colbacktitle=red!75!black, + fonttitle=\bfseries, + enhanced, + attach boxed title to top left={yshift=-2mm,xshift=5mm}, + breakable, + top=0.4cm, + } + } + \tikzset{ + overlaystyle/.style={ + draw=red!75!black, + thick, + fill=red!75!black, + left, + anchor=east, + text=white, + rounded corners=1mm, + font=\bfseries, + xshift=-5mm, + yshift=1mm, + inner xsep=3mm, + inner ysep=1.5mm + } + } } % -------------------- % % Small style elements % % -------------------- % \newcommand{\setFont}[1]{\fontfamily{#1}\selectfont} +\newcommand{\setFontType}[1]{ + \ifthenelse{\equal{#1}{mono}}{ + \renewcommand{\familydefault}{\ttdefault} + }{ + \ifthenelse{\equal{#1}{serif}}{ + \renewcommand{\familydefault}{\rmdefault} + }{ + \renewcommand{\familydefault}{\sfdefault} + } + } +} \renewcommand{\footrulewidth}{0.4pt} \newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}} \newcommand{\bi}[1]{\textbf{\textit{#1}}} % Add a color shade (similar to \fhlc, but nicer boxes) \newcommand{\background}[3]{\tcbox[on line, - boxsep=2pt, - left=0pt, - right=0pt, - top=0pt, - bottom=0pt, - colframe=white, - frame empty, - colback=#1!#2!white, - highlight math style={enhanced} - ] {\textbf{#3}}} + boxsep=2pt, + left=0pt, + right=0pt, + top=0pt, + bottom=0pt, + colframe=white, + frame empty, + colback=#1!#2!white, + highlight math style={enhanced} + ] {\textbf{#3}}} % Abstraction of background, where the brightness is set to 20% \newcommand{\shade}[2]{\background{#1}{\arabic{shadeStrength}}{#2}} @@ -89,12 +100,12 @@ % Print a table of contents as a tcolorbox \newcommand{\printtoc}[1]{ - \renewcommand{\cfttoctitlefont}{} - \renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}} - \renewcommand{\contentsname}{} - \begin{tcolorbox}[colback=black!5!white,colbacktitle=#1!75!black,coltitle=black,enhanced,attach boxed title to top center={yshift=-2mm}, - title={\Large \ifnum\value{lang}<2{Contents}\else {Inhaltsverzeichnis}\fi},fonttitle=\bfseries,breakable] - \hspace{1cm} - \tableofcontents - \end{tcolorbox} + \renewcommand{\cfttoctitlefont}{} + \renewcommand{\cftaftertoctitle}{\vspace{-0.75cm}} + \renewcommand{\contentsname}{} + \begin{tcolorbox}[colback=black!5!white,colbacktitle=#1!75!black,coltitle=black,enhanced,attach boxed title to top center={yshift=-2mm}, + title={\Large \ifnum\value{lang}<2{Contents}\else {Inhaltsverzeichnis}\fi},fonttitle=\bfseries,breakable] + \hspace{1cm} + \tableofcontents + \end{tcolorbox} }