[Font] Make font change better, document it
This commit is contained in:
BIN
docs/docs.pdf
BIN
docs/docs.pdf
Binary file not shown.
@@ -29,7 +29,10 @@
|
|||||||
\item \verb|\setcounter{descriptorShadeStrength}|\{\textit{number}\} Change the colour saturation of the inline descriptors
|
\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|\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 \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{<font name>}|. 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}
|
\end{itemize}
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
|
@@ -45,6 +45,17 @@
|
|||||||
% Small style elements %
|
% Small style elements %
|
||||||
% -------------------- %
|
% -------------------- %
|
||||||
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
|
\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}
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
|
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
|
||||||
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
|
\newcommand{\bi}[1]{\textbf{\textit{#1}}}
|
||||||
|
Reference in New Issue
Block a user