Compare commits

..

25 Commits

Author SHA1 Message Date
2c7f5a4dcf [Counters] Add toggling function 2025-10-10 08:14:03 +02:00
7394606963 [Snippets] Add snippet for new tcbox 2025-10-09 21:29:39 +02:00
a7d9915383 [Style] Fix wrong naming 2025-10-09 21:29:31 +02:00
f70ce6d2b3 [Style] Add new intuition macro 2025-10-09 21:09:15 +02:00
c977c98dcf [CS] Fix stylistic error 2025-10-09 16:18:19 +02:00
65ab228f9e [CS] Add more commands for words & alphabets 2025-10-09 16:17:26 +02:00
eb6df64aab [CS] Add command for classes in TI 2025-10-04 08:46:35 +02:00
af6063c5fe [CS] Add new macro for big vdash 2025-10-03 19:39:46 +02:00
4110159f10 [Math] Improve derivative d 2025-09-30 18:25:43 +02:00
a756902a4f [Style] Add remove whitespace macro 2025-09-30 15:37:50 +02:00
25fb100c4f [counter] Fix subsection numbering 2025-09-30 09:38:03 +02:00
072df5cf66 [Docs] Complete restructure 2025-09-29 16:29:51 +02:00
e8712fda9a [Font] Make font change better, document it 2025-09-29 15:48:07 +02:00
c4779f3d6a [Code] Add inline code snippets, docs on typeface change 2025-09-29 15:16:48 +02:00
6c75936b18 [Code] Add mathescape option to code blocks 2025-09-29 13:17:17 +02:00
4a98d7d3af [Code] Add better code snippets 2025-09-28 20:05:58 +02:00
14210ca1da [Counters] Completely redo numbering logic 2025-09-28 17:51:57 +02:00
5f66b9e1db [CS] Update macros 2025-09-26 18:19:04 +02:00
ba7e3f444a [CS] Update word math mode macro 2025-09-26 18:17:35 +02:00
05d5ef49e6 [CS] Add more macros for TI 2025-09-26 18:16:43 +02:00
1f296ccd56 [CS] Add new macro for words 2025-09-26 18:12:09 +02:00
4be2f5ed0d [Descriptors] Uniform style for all 2025-09-26 14:16:47 +02:00
4b4d5b0a32 [Docs] Fix error in organization, compile 2025-09-26 12:11:20 +02:00
565b600ef0 [Docs] Add docs on breaking change 2025-09-26 12:07:48 +02:00
bfaec9ba8c [CS] BREAKING: tc* commands now need to be in math environment 2025-09-26 11:20:56 +02:00
22 changed files with 712 additions and 551 deletions

View File

@@ -5,6 +5,9 @@
This repository contains a collection of LaTeX files, helping you get started with LaTeX quickly.
Breaking change in the current version: the time complexity commands now require the math environment. You may use the following vim-regex to fix issues in your code:
`:%s/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g` (execute first) and `:%s/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g`
# Getting started
See the docs [here](https://git.janishutz.com/janishutz/latex/src/branch/main/docs/docs.pdf) to get started.

Binary file not shown.

View File

@@ -26,6 +26,12 @@ This set of \LaTeX files is designed to give you a good looking, pre-configured
It has some configuration options already, but more are to come soon. If you have any suggestions as to what should be added, don't hesitate to open a support ticket at \url{https://support.janishutz.com?a=add} or contacting me via email to \texttt{development@janishutz.com}.
\begin{Large}
\shade{red}{Breaking Changes}: The timecomplexity commands have been updated to require math environment. You can use the following regex to fix them
\verb|:%s/ \\tc\([olt]\){\(.*)}\([, .\n]\)/ \$\\tc\1{\2}\$\3/g| (execute first) and \verb|:%s/\\text{\\tc\([olt]\){\(.*\)}}/\\tc\1{\2}/g|
\end{Large}
\section{Installation}
You can install these helper files by downloading this repo and storing it to any location on your PC, remembering where that location is.
@@ -36,7 +42,21 @@ You may also install the VSCode snippets found in the vscode-snippets folder. Th
\input{./parts/custom-loader.tex}
\input{./parts/reference.tex}
% ┌ ┐
% │ Reference │
% └ ┘
\input{./parts/reference/intro.tex}
\input{./parts/reference/loading.tex}
\input{./parts/reference/math.tex}
\input{./parts/reference/cs.tex}
\input{./parts/reference/style/intro.tex}
\input{./parts/reference/style/tcolorbox/default.tex}
\input{./parts/reference/style/tcolorbox/counter.tex}
\input{./parts/reference/style/tcolorbox/other.tex}
\input{./parts/reference/style/descriptors.tex}
\input{./parts/reference/tables-index.tex}
\input{./parts/reference/extras.tex}
\input{./parts/troubleshooting.tex}

View File

@@ -1,450 +0,0 @@
\newsection
\section{Full Command Reference}
\subsection{Variables}
\begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\item \textit{string}: Any normal text
\item \textit{math}: Any math input
\item \textit{number}: Any non-negative integer, i.e. no commas
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor}
\item \textit{langauge}: 2-character country code (currently only \texttt{de} and \texttt{en} supported)
\end{itemize}
\subsection{Per-File config}
\label{sec:perFileConf}
\begin{itemize}
\item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only
\item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only
\item \verb|\renewcommand{\name}|\{\textit{string}\} Change the name (for letters) for this document only
\item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
\item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only
\item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only
\item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'')
\item \verb|\setcounter{numberingConfig}|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 1 = Separately, 2 = Combined (except for definition), 3 = Combined, 4 = Off
\item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
0 = $<$section$>$.$<$number$>$,\\
1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\
2 = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$\\
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the one above) at any point in the document
\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
\end{itemize}
\subsection{Setup, Loading \& Translation}
\begin{itemize}
\item \verb|\load|\{\textit{scope}\} Load the selected \textit{scope}
\item \verb|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title
\item \verb|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
\item \verb|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
\item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up)
\item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected
\item \verb|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|
\end{itemize}
\newpage
\subsection{Math-Commands}
All these have to be executed in the math environment.
\begin{itemize}
\item \verb|\R| Prints $\R$. Same goes for \verb|\C| printing $\C$, etc.
\item \verb|\floor|\{\textit{math}\} Round down symbol, e.g. $\floor{n}$
\item \verb|\ceil|\{\textit{math}\} Round up symbol, e.g. $\ceil{n}$
\item \verb|\hastoeq| or \verb|\mbeq| Has to equal symbol (non-standard), $\hastoeq$
\item \verb|\Leftrightarrowequiv| Equivalence transformation symbol, $\Leftrightarrowequiv$.
\item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$.
\item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$.
\item \verb|\defAs| Define as, i.e. $\defAs$
\item \verb|\defEquiv| Define as, but with a two-sided implication instead of equality, i.e. $\defEquiv$
\item \verb|\defImplies| Define as, but with one-sided implication, i.e. $\defImplies$
\item \verb|\divides| Divider or divides symbol, e.g. $a \divides b$
\item \verb|\lcm| Least common multiple, $\lcm$
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
\item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$
\item \verb|\arctanh| Inverse of hyperbolic tangent, $\arctanh$
\item \verb|\limit|\{\textit{math}\}\{\textit{math}\} Shortened limit notation, $\displaystyle \limit{x}{x_0}$
\item \verb|\limni| Shortened limit notation for $n \rightarrow \infty$, $\displaystyle \limni$
\item \verb|\liminfni| Shortened limit inferior notation for $n \rightarrow \infty$, $\displaystyle \liminfni$
\item \verb|\limsupni| Shortened limit superior notation for $n \rightarrow \infty$, $\displaystyle \limsupni$
\item \verb|\der|\{\textit{math}\} Derivative, $\displaystyle \der{x}$
\item \verb|\dern|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \dern{x}{2}$
\end{itemize}
\subsection{CS-Commands}
These commands have to be executed outside the math environment.
\begin{itemize}
\item \verb|\timecomplexity| Prints the word time complexity with a coloured box.
\item \verb|\tc| Shorthand for \verb|\tct|. Deprecated
\item \verb|\tct| Time complexity in \tct{}-notation (average case)
\item \verb|\tco| Time complexity in \tco{}-notation (worst case / upper bound)
\item \verb|\tcl| Time complexity in \tcl{}-notation (best case / lower bound)
\item \verb|\t[R, C, N]| Simply prints a capital R, C or N in math mode as normal text. So e.g. use $\tR$ to print an R
\end{itemize}
\fhlc{Aquamarine}{Algorithms}
\begin{minted}{latex}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}
\end{minted}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}
\newpage
\subsection{Style}
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
\begin{itemize}
\item \verb|\TODO| Print a highlighted \TODO
\item \verb|\background|\{\textit{color}\}\{\textit{number}\}\{\textit{string}\} Print \background{ForestGreen}{50}{shaded text, with colour saturation}
\item \verb|\shade|\{\textit{color}\}\{\textit{string}\} Print \shade{ForestGreen}{shaded text}
\item \verb|\backdrop|\{\textit{string}\} Print \backdrop{text with gray backdrop}
\item \verb|\fhlc|\{\textit{color}\}\{\textit{string}\} Print \fhlc{ForestGreen}{bold, underlined text in a coloured box}
\item \verb|\fhl|\{\textit{string}\} Print \fhl{bold, underlined text in a white box}
\item \verb|\printtoc|\{\textit{color}\} Print the table of contents (as seen on the first page). The normal \verb|\tableofcontents| still works as expected
\item \verb|\smallhspace| Prints a 2mm hspace
\item \verb|\mediumhspace| Prints a 5mm hspace
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
\end{itemize}
\newpage
\subsubsection{Tcolorboxes}
\textit{Included in \texttt{most} and up}
Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|\begin{document}|) if you plan to use them.
\fhlc{Aquamarine}{General}
\begin{terms}[]{Title here}
\begin{minted}{latex}
\begin{terms}[]{Title here}
\end{terms}
\end{minted}
\end{terms}
\begin{notation}[]{Title here}
\begin{minted}{latex}
\begin{notation}[]{Title here}
\end{notation}
\end{minted}
\end{notation}
\begin{recall}[]{Title here}
\begin{minted}{latex}
\begin{recall}[]{Title here}
\end{recall}
\end{minted}
\end{recall}
\begin{remarks}[]{Title here}
\begin{minted}{latex}
\begin{remarks}[]{Title here}
\end{remarks}
\end{minted}
\end{remarks}
\begin{usage}[]{Title here}
\begin{minted}{latex}
\begin{usage}[]{Title here}
\end{usage}
\end{minted}
\end{usage}
\begin{guides}[]{Title here}{Tutorial}
\begin{minted}{latex}
\begin{guides}[]{Title here}{Tutorial}
% You can also change the right title on this one
\end{guides}
\end{minted}
\end{guides}
\begin{properties}[]{Title here}
\begin{minted}{latex}
\begin{properties}[]{Title here}
\end{properties}
\end{minted}
\end{properties}
\begin{restrictions}[]{Title here}
\begin{minted}{latex}
\begin{restrictions}[]{Title here}
\end{restrictions}
\end{minted}
\end{restrictions}
\begin{limitations}[]{Title here}
\begin{minted}{latex}
\begin{limitations}[]{Title here}
\end{limitations}
\end{minted}
\end{limitations}
\fhlc{Aquamarine}{Math-Specific}
\begin{formula}[]{Title here}
\begin{minted}{latex}
\begin{formula}[]{Title here}
\end{formula}
\end{minted}
\end{formula}
\vspace{1cm}
\fhlc{Aquamarine}{Counter-enabled}
These ones also have two settings, namely, you can change the counter behaviour and the inclusion of subsections in the numbering. See \ref{sec:perFileConf}.
See \ref{sec:counters} for a guide on how to change the current number.
\begin{definition}[]{Title here}
\begin{minted}{latex}
\begin{definition}[]{Title here}
\end{definition}
\end{minted}
\end{definition}
\begin{theorem}[]{Title here}
\begin{minted}{latex}
\begin{theorem}[]{Title here}
\end{theorem}
\end{minted}
\end{theorem}
\begin{lemma}[]{Title here}
\begin{minted}{latex}
\begin{lemma}[]{Title here}
\end{lemma}
\end{minted}
\end{lemma}
\begin{corollary}[]{Title here}
\begin{minted}{latex}
\begin{corollary}[]{Title here}
\end{corollary}
\end{minted}
\end{corollary}
\begin{proposition}[]{Title here}
\begin{minted}{latex}
\begin{proposition}[]{Title here}
\end{proposition}
\end{minted}
\end{proposition}
\newpage
\begin{fact}[]{Title here}
\begin{minted}{latex}
\begin{fact}[]{Title here}
\end{fact}
\end{minted}
\end{fact}
\begin{axiom}[]{Title here}
\begin{minted}{latex}
\begin{axiom}[]{Title here}
\end{axiom}
\end{minted}
\end{axiom}
\begin{example}[]{Title here}
\begin{minted}{latex}
\begin{example}[]{Title here}
\end{example}
\end{minted}
\end{example}
\begin{remark}[]{Title here}
\begin{minted}{latex}
\begin{remark}[]{Title here}
\end{remark}
\end{minted}
\end{remark}
\newpage
\fhlc{Aquamarine}{Language-Specific}
\begin{conjugation}[]{Title here}
\begin{minted}{latex}
\begin{conjugation}[]{Title here}
\end{conjugation}
\end{minted}
\end{conjugation}
\begin{forms}[]{Title here}
\begin{minted}{latex}
\begin{forms}[]{Title here}
\end{forms}
\end{minted}
\end{forms}
\fhlc{Aquamarine}{CS-Specific}
\textit{Coming soon!}
\fhlc{Aquamarine}{Flexible}
\begin{general}[]{title}{second title}{red}
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.\\
\begin{minted}{latex}
\begin{general}[]{title}{second title}{red}
\end{general}
\end{minted}
\end{general}
\newpage
\subsubsection{Inline \& Shortened descriptors}
\textit{Included in \texttt{most} and up}
See \ref{sec:counters} for a guide on how to change the current number.
\fhlc{Aquamarine}{Inline}
\begin{tables}{ll}{Command & Output}
\verb|\inlineex| & \inlineex \\
\verb|\inlinedef| & \inlinedef \\
\verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\
\verb|\inlineproposition| & \inlineproposition \\
\verb|\inlinefact| & \inlinefact \\
\verb|\inlineaxiom| & \inlineaxiom \\
\verb|\inlineremark| & \inlineremark \\
\verb|\inlineproof| & \inlineproof \\
\end{tables}
\fhlc{Aquamarine}{Shortened}
\begin{tables}{ll}{Command & Output}
\verb|\shortex| & \shortex \\
\verb|\shortdef| & \shortdef \\
\verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\
\verb|\shortproposition| & \shortproposition \\
\verb|\shortfact| & \shortfact \\
\verb|\shortaxiom| & \shortaxiom \\
\verb|\shortremark| & \shortremark \\
\verb|\shortproof| & \shortproof \\
\end{tables}
\newpage
\fhlc{Aquamarine}{Inline (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\fancyex|\{\textit{string}\} & \fancyex{Exercise} \\
\verb|\fancydef|\{\textit{string}\} & \fancydef{Definition} \\
\verb|\fancytheorem|\{\textit{string}\} & \fancytheorem{Theorem} \\
\verb|\fancylemma|\{\textit{string}\} & \fancylemma{Lemma} \\
\verb|\fancycorollary|\{\textit{string}\} & \fancycorollary{Corollary} \\
\verb|\fancyproposition|\{\textit{string}\} & \fancyproposition{Proposition} \\
\verb|\fancyfact|\{\textit{string}\} & \fancyfact{Fact} \\
\verb|\fancyaxiom|\{\textit{string}\} & \fancyaxiom{Axiom} \\
\verb|\fancyremark|\{\textit{string}\} & \fancyremark{Remark} \\
\verb|\fancyproof|\{\textit{string}\} & \fancyproof{Proof} \\
\end{tables}
\fhlc{Aquamarine}{Shortened (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\compactex|\{\textit{string}\} & \compactex{Exercise} \\
\verb|\compactdef|\{\textit{string}\} & \compactdef{Definition} \\
\verb|\compacttheorem|\{\textit{string}\} & \compacttheorem{Theorem} \\
\verb|\compactlemma|\{\textit{string}\} & \compactlemma{Lemma} \\
\verb|\compactcorollary|\{\textit{string}\} & \compactcorollary{Corollary} \\
\verb|\compactproposition|\{\textit{string}\} & \compactproposition{Proposition} \\
\verb|\compactfact|\{\textit{string}\} & \compactfact{Fact} \\
\verb|\compactaxiom|\{\textit{string}\} & \compactaxiom{Axiom} \\
\verb|\compactremark|\{\textit{string}\} & \compactremark{Remark} \\
\verb|\compactproof|\{\textit{string}\} & \compactproof{Proof} \\
\end{tables}
\subsubsection{Changing the counters}
\label{sec:counters}
\textit{Included in \texttt{most} and up}
You may set the current number for the elements by setting their corresponding counter to the selected number.
You can do this using \verb|\setcounter|\{\textit{name of the counter}\}\{\textit{number}\}, where you replace \textit{name of the counter} with one of the following:
\texttt{definitions}, \texttt{lemmas}, \texttt{theorems}, \texttt{corollaries}, \texttt{propositions}, \texttt{facts}, \texttt{axioms}, \texttt{examples}, \texttt{remarks}
This only applies if you have set numberingConfig to $1$ (for all of them) and $2$ (only for \texttt{definitions}).
To change the combined numbering, set \texttt{all} to your desired number.
\newpage
\subsection{Tables}
\textit{Included in \texttt{most} and up}
You can set up nice looking tables using the \texttt{booktab} and \texttt{tabulary} environments.
\begin{minted}{latex}
\begin{tables}{ll}{Left & Right}
Left content & Right Content\\
\end{tables}
\end{minted}
This outputs as
\begin{tables}{ll}{Left & Right}
Left content & Right Content \\
\end{tables}
This doesn't use the \texttt{table} environment, so no captions are possible, as to why there is also
\begin{minted}{latex}
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
\end{minted}
This outputs as
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
\subsection{Index}
\textit{Included in \texttt{most} and up}
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index. They are printed in bold typeface in your document.
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics
\subsection{Extras}
\subsubsection{BibTeX}
\textit{Included in \texttt{recommended} and up}
Use \verb|\setupBiber|\{\textit{/path/to/your/bib/sources.bib file}\} in the preamble to prepare, then use \verb|\printbib| to print your bibliography.
\subsubsection{Glossary}
\textit{Included in \texttt{recommended} and up}
Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossary commands to add entries to the glossary. When you want to print it, use \verb|\printGlossary|.
\subsubsection{Minted}
\textit{Included in \texttt{full}}
No extra configs or commands provided by this one, simply an import for minted. Be sure to enable \texttt{shell-escape} for your compiler!

View File

@@ -0,0 +1,32 @@
\newpage
\subsection{CS-Commands}
These commands have to be executed inside math environment, except \verb|\timecomplexity| and \verb|\tc|.
\begin{itemize}
\item \verb|\timecomplexity| Prints the word time complexity with a coloured box.
\item \verb|\tc| Shorthand for \verb|\tct|. Deprecated
\item \verb|\tct| Time complexity in $\tct{}$-notation (average case)
\item \verb|\tco| Time complexity in $\tco{}$-notation (worst case / upper bound)
\item \verb|\tcl| Time complexity in $\tcl{}$-notation (best case / lower bound)
\item \verb|\t[R, C, N]| Simply prints a capital R, C or N in math mode as normal text. So e.g. use $\tR$ to print an R
\item \verb|\wordbool| Prints $\wordbool$
\item \verb|\words|\{\textit{string}\} Prints $\words{test}$
\item \verb|\wordm|\{\textit{math}\} Prints $\wordm{1}$
\item \verb|\word| Prints $\word$
\item \verb|\alphabets|\{\textit{string}\} Prints $\alphabets{test}$
\item \verb|\alphabetbool| Prints $\alphabetbool$
\end{itemize}
\fhlc{Aquamarine}{Algorithms}
\begin{minted}{latex}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}
\end{minted}
\begin{algo}{functionName(A)}
\Procedure{functionName}{$(A)$}
\State\Return "Hello World"
\EndProcedure
\end{algo}

View File

@@ -0,0 +1,41 @@
\newpage
\subsection{Extras}
\subsubsection{BibTeX}
\textit{Included in \texttt{recommended} and up}
Use \verb|\setupBiber|\{\textit{/path/to/your/bib/sources.bib file}\} in the preamble to prepare, then use \verb|\printbib| to print your bibliography.
To add more sources, simply use bibter's built-in macro \verb|\addbibresource|\textit{\{filepath\}}, which will load your \texttt{.bib} file.
You need to use that inside the preamble as well.
\subsubsection{Glossary}
\textit{Included in \texttt{recommended} and up}
Use \verb|\setupGlossary| in the preamble to prepare, then use the normal glossary commands to add entries to the glossary. When you want to print it, use \verb|\printGlossary|.
\subsubsection{Minted}
\textit{Included in \texttt{full}}
Be sure to enable \texttt{shell-escape} for your compiler!
When \texttt{minted} is available via these helpers, you will also have access to the \texttt{codesnippet} macro:
\begin{minted}{latex}
\begin{code}{language}
//Code goes here
\end{code}
\end{minted}
This is nothing different than a wrapper for a minted environment with a box drawn around it.
Example (in python):
\begin{code}{python}
def hello_world():
print("hello world!")
\end{code}
If you want to print code inline, use \verb|\inlinecode|\textit{\{string\}}, which redners to \inlinecode{code}.
\textit{Caveat: This is not using the \texttt{verbatim} environment due to various limitations of that environment and instead is simply using} \verb|\texttt{}|, so you cannot use this to print \LaTeX-commands

View File

@@ -0,0 +1,12 @@
\newsection
\section{Full Command Reference}
\subsection{Variables}
\begin{itemize}
\item \textit{scope}: \texttt{minimal}, \texttt{most}, \texttt{recommended}, \texttt{all} or \texttt{letter}
\item \textit{string}: Any normal text
\item \textit{math}: Any math input
\item \textit{number}: Any non-negative integer, i.e. no commas
\item \textit{color}: Any of the \texttt{dvipsnames} colours of \texttt{xcolor}
\item \textit{langauge}: 2-character country code (currently only \texttt{de} and \texttt{en} supported)
\end{itemize}

View File

@@ -0,0 +1,39 @@
\subsection{Per-File config}
\label{sec:perFileConf}
\begin{itemize}
\item \verb|\renewcommand{\authorTitle}|\{\textit{string}\} Change the author (in the title) for this document only
\item \verb|\renewcommand{\authorHeaders}|\{\textit{string}\} Change the author (in the header) for this document only
\item \verb|\renewcommand{\name}|\{\textit{string}\} Change the name (for letters) for this document only
\item \verb|\renewcommand{\street}|\{\textit{string}\} Change the street (for letters) for this document only
\item \verb|\renewcommand{\city}|\{\textit{string}\} Change the city (for letters) for this document only
\item \verb|\renewcommand{\countrycode}|\{\textit{string}\} Change the country-code (for letters) for this document only
\item \verb|\renewcommand{\theoremde}|\{\textit{string}\} Change the translation for theorem in German (usually either ``Satz'' or ``Theorem'')
\item \verb|\setNumberingStyle|\{\textit{number}\} Change the numbering of definitions, lemmas, etc for this document. 0 = off, 1 = Separately, 2 = Combined (except for definition), 3 = Combined
\item \verb|\setcounter{numberSubsections}|\{\textit{number}\} Change the format of the numbering of definition, lemma, etc.
0 = $<$section$>$.$<$number$>$,\\
1 = $<$section$>$.$<$subsection$>$.$<$number$>$,\\
2 = $<$section$>$.$<$subsection$>$.$<$subsubsection$>$.$<$number$>$\\
Changing this won't affect all of numbering prior to the command, only after. You can change this setting (and the one above) at any point in the document
\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|, 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
\subsection{Setup, Loading \& Translation}
\begin{itemize}
\item \verb|\load|\{\textit{scope}\} Load the selected \textit{scope}
\item \verb|\setup|\{\textit{string}\} Prepare the document with the \textit{string} being the title
\item \verb|\setupCheatSheet|\{\textit{string}\} Prepare the document with smaller borders and no headers / footers. \textit{string} is the title
\item \verb|\setupBarebones|\{\textit{string}\} Minimal setup, only borders and title set
\item \verb|\startDocument| Initialize the document. Has to be called after \verb|\begin{document}|
\item \verb|\usetcolorboxes| Initialize tcolorboxes. In main body, if you want to use fancy boxes. (requires \texttt{most} or up)
\item \verb|\translate|\{\textit{string}\}\{\textit{string}\} First \textit{string} is English, second \textit{string} is German. Switches automatically based on language selected
\item \verb|\tr|\{\textit{string}\}\{\textit{string}\} Shorthand for \verb|\translate|
\item \verb|\numberingOn| Turn on the numbering (will set back to config previously set by \verb|\setNumberingStyle|)
\item \verb|\numberingOff| Turn off the numbering (if you want to temporarily not use it. Do not use \verb|\setNumberingStyle| for that)
\end{itemize}

View File

@@ -0,0 +1,27 @@
\newpage
\subsection{Math-Commands}
All these have to be executed in the math environment.
\begin{itemize}
\item \verb|\R| Prints $\R$. Same goes for \verb|\C| printing $\C$, etc.
\item \verb|\floor|\{\textit{math}\} Round down symbol, e.g. $\floor{n}$
\item \verb|\ceil|\{\textit{math}\} Round up symbol, e.g. $\ceil{n}$
\item \verb|\hastoeq| or \verb|\mbeq| Has to equal symbol (non-standard), $\hastoeq$
\item \verb|\Leftrightarrowequiv| Equivalence transformation symbol, $\Leftrightarrowequiv$.
\item \verb|\Rightarrowequiv| Equivalence transformation symbol, $\Rightarrowequiv$.
\item \verb|\Leftarrowequiv| Equivalence transformation symbol, $\Leftarrowequiv$.
\item \verb|\defAs| Define as, i.e. $\defAs$
\item \verb|\defEquiv| Define as, but with a two-sided implication instead of equality, i.e. $\defEquiv$
\item \verb|\defImplies| Define as, but with one-sided implication, i.e. $\defImplies$
\item \verb|\divides| Divider or divides symbol, e.g. $a \divides b$
\item \verb|\lcm| Least common multiple, $\lcm$
\item \verb|\arcsinh| Inverse of hyperbolic sine, $\arcsinh$
\item \verb|\arccosh| Inverse of hyperbolic cosine, $\arccosh$
\item \verb|\arctanh| Inverse of hyperbolic tangent, $\arctanh$
\item \verb|\limit|\{\textit{math}\}\{\textit{math}\} Shortened limit notation, $\displaystyle \limit{x}{x_0}$
\item \verb|\limni| Shortened limit notation for $n \rightarrow \infty$, $\displaystyle \limni$
\item \verb|\liminfni| Shortened limit inferior notation for $n \rightarrow \infty$, $\displaystyle \liminfni$
\item \verb|\limsupni| Shortened limit superior notation for $n \rightarrow \infty$, $\displaystyle \limsupni$
\item \verb|\der|\{\textit{math}\} Derivative, $\displaystyle \der{x}$
\item \verb|\dern|\{\textit{math}\}\{\textit{math}\} Higher derivative, $\displaystyle \dern{x}{2}$
\end{itemize}

View File

@@ -0,0 +1,74 @@
\newpage
\subsubsection{Inline \& Shortened descriptors}
\textit{Included in \texttt{most} and up}
See \ref{sec:counters} for a guide on how to change the current number.
\fhlc{Aquamarine}{Inline}
\begin{tables}{ll}{Command & Output}
\verb|\inlineex| & \inlineex \\
\verb|\inlinedef| & \inlinedef \\
\verb|\inlinetheorem| & \inlinetheorem \\
\verb|\inlinelemma| & \inlinelemma \\
\verb|\inlinecorollary| & \inlinecorollary \\
\verb|\inlineproposition| & \inlineproposition \\
\verb|\inlinefact| & \inlinefact \\
\verb|\inlineaxiom| & \inlineaxiom \\
\verb|\inlineremark| & \inlineremark \\
\verb|\inlineproof| & \inlineproof \\
\end{tables}
\fhlc{Aquamarine}{Shortened}
\begin{tables}{ll}{Command & Output}
\verb|\shortex| & \shortex \\
\verb|\shortdef| & \shortdef \\
\verb|\shorttheorem| & \shorttheorem \\
\verb|\shortlemma| & \shortlemma \\
\verb|\shortcorollary| & \shortcorollary \\
\verb|\shortproposition| & \shortproposition \\
\verb|\shortfact| & \shortfact \\
\verb|\shortaxiom| & \shortaxiom \\
\verb|\shortremark| & \shortremark \\
\verb|\shortproof| & \shortproof \\
\end{tables}
\newpage
\fhlc{Aquamarine}{Inline (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\fancyex|\{\textit{string}\} & \fancyex{Exercise} \\
\verb|\fancydef|\{\textit{string}\} & \fancydef{Definition} \\
\verb|\fancytheorem|\{\textit{string}\} & \fancytheorem{Theorem} \\
\verb|\fancylemma|\{\textit{string}\} & \fancylemma{Lemma} \\
\verb|\fancycorollary|\{\textit{string}\} & \fancycorollary{Corollary} \\
\verb|\fancyproposition|\{\textit{string}\} & \fancyproposition{Proposition} \\
\verb|\fancyfact|\{\textit{string}\} & \fancyfact{Fact} \\
\verb|\fancyaxiom|\{\textit{string}\} & \fancyaxiom{Axiom} \\
\verb|\fancyremark|\{\textit{string}\} & \fancyremark{Remark} \\
\verb|\fancyproof|\{\textit{string}\} & \fancyproof{Proof} \\
\end{tables}
\fhlc{Aquamarine}{Shortened (Named)}
\begin{tables}{ll}{Command & Output}
\verb|\compactex|\{\textit{string}\} & \compactex{Exercise} \\
\verb|\compactdef|\{\textit{string}\} & \compactdef{Definition} \\
\verb|\compacttheorem|\{\textit{string}\} & \compacttheorem{Theorem} \\
\verb|\compactlemma|\{\textit{string}\} & \compactlemma{Lemma} \\
\verb|\compactcorollary|\{\textit{string}\} & \compactcorollary{Corollary} \\
\verb|\compactproposition|\{\textit{string}\} & \compactproposition{Proposition} \\
\verb|\compactfact|\{\textit{string}\} & \compactfact{Fact} \\
\verb|\compactaxiom|\{\textit{string}\} & \compactaxiom{Axiom} \\
\verb|\compactremark|\{\textit{string}\} & \compactremark{Remark} \\
\verb|\compactproof|\{\textit{string}\} & \compactproof{Proof} \\
\end{tables}
\subsubsection{Changing the counters}
\label{sec:counters}
\textit{Included in \texttt{most} and up}
You may set the current number for the elements by setting their corresponding counter to the selected number.
You can do this using \verb|\setcounter|\{\textit{name of the counter}\}\{\textit{number}\}, where you replace \textit{name of the counter} with one of the following:
\texttt{definitions}, \texttt{lemmas}, \texttt{theorems}, \texttt{corollaries}, \texttt{propositions}, \texttt{facts}, \texttt{axioms}, \texttt{examples}, \texttt{remarks}
This only applies if you have set numberingConfig to $1$ (for all of them) and $2$ (only for \texttt{definitions}).
To change the combined numbering, set \texttt{all} to your desired number.

View File

@@ -0,0 +1,16 @@
\newpage
\subsection{Style}
General styling commands. All other commands, except these ones require at least \texttt{most} to be the selected \textit{scope}
\begin{itemize}
\item \verb|\TODO| Print a highlighted \TODO
\item \verb|\background|\{\textit{color}\}\{\textit{number}\}\{\textit{string}\} Print \background{ForestGreen}{50}{shaded text, with colour saturation}
\item \verb|\shade|\{\textit{color}\}\{\textit{string}\} Print \shade{ForestGreen}{shaded text}
\item \verb|\backdrop|\{\textit{string}\} Print \backdrop{text with gray backdrop}
\item \verb|\fhlc|\{\textit{color}\}\{\textit{string}\} Print \fhlc{ForestGreen}{bold, underlined text in a coloured box}
\item \verb|\fhl|\{\textit{string}\} Print \fhl{bold, underlined text in a white box}
\item \verb|\printtoc|\{\textit{color}\} Print the table of contents (as seen on the first page). The normal \verb|\tableofcontents| still works as expected
\item \verb|\smallhspace| Prints a 2mm hspace
\item \verb|\mediumhspace| Prints a 5mm hspace
\item \verb|\largehspace| Prints a 10mm = 1cm hspace
\item \verb|\rmvspace| Removes some of the vertical whitespace printed by environments like \verb|align|
\end{itemize}

View File

@@ -0,0 +1,86 @@
\newpage
\fhlc{Aquamarine}{Counter-enabled}
These ones also have two settings, namely, you can change the counter behaviour and the inclusion of subsections in the numbering. See \ref{sec:perFileConf}.
See \ref{sec:counters} for a guide on how to change the current number.
\begin{definition}[]{Title here}
\begin{minted}{latex}
\begin{definition}[]{Title here}
\end{definition}
\end{minted}
\end{definition}
\begin{theorem}[]{Title here}
\begin{minted}{latex}
\begin{theorem}[]{Title here}
\end{theorem}
\end{minted}
\end{theorem}
\begin{lemma}[]{Title here}
\begin{minted}{latex}
\begin{lemma}[]{Title here}
\end{lemma}
\end{minted}
\end{lemma}
\begin{corollary}[]{Title here}
\begin{minted}{latex}
\begin{corollary}[]{Title here}
\end{corollary}
\end{minted}
\end{corollary}
\begin{proposition}[]{Title here}
\begin{minted}{latex}
\begin{proposition}[]{Title here}
\end{proposition}
\end{minted}
\end{proposition}
\begin{fact}[]{Title here}
\begin{minted}{latex}
\begin{fact}[]{Title here}
\end{fact}
\end{minted}
\end{fact}
\begin{axiom}[]{Title here}
\begin{minted}{latex}
\begin{axiom}[]{Title here}
\end{axiom}
\end{minted}
\end{axiom}
\begin{example}[]{Title here}
\begin{minted}{latex}
\begin{example}[]{Title here}
\end{example}
\end{minted}
\end{example}
\begin{remark}[]{Title here}
\begin{minted}{latex}
\begin{remark}[]{Title here}
\end{remark}
\end{minted}
\end{remark}
\begin{formula}[]{Title here}
\begin{minted}{latex}
\begin{formula}[]{Title here}
\end{formula}
\end{minted}
\end{formula}

View File

@@ -0,0 +1,89 @@
\newpage
\subsubsection{Tcolorboxes}
\textit{Included in \texttt{most} and up}
Put \verb|\usetcolorboxes| right after \verb|\startDocument| (right after \verb|\begin{document}|) if you plan to use them.
\fhlc{Aquamarine}{General}
\begin{terms}[]{Title here}
\begin{minted}{latex}
\begin{terms}[]{Title here}
\end{terms}
\end{minted}
\end{terms}
\begin{notation}[]{Title here}
\begin{minted}{latex}
\begin{notation}[]{Title here}
\end{notation}
\end{minted}
\end{notation}
\begin{recall}[]{Title here}
\begin{minted}{latex}
\begin{recall}[]{Title here}
\end{recall}
\end{minted}
\end{recall}
\begin{remarks}[]{Title here}
\begin{minted}{latex}
\begin{remarks}[]{Title here}
\end{remarks}
\end{minted}
\end{remarks}
\begin{usage}[]{Title here}
\begin{minted}{latex}
\begin{usage}[]{Title here}
\end{usage}
\end{minted}
\end{usage}
\begin{guides}[]{Title here}{Tutorial}
\begin{minted}{latex}
\begin{guides}[]{Title here}{Tutorial}
% You can also change the right title on this one
\end{guides}
\end{minted}
\end{guides}
\begin{properties}[]{Title here}
\begin{minted}{latex}
\begin{properties}[]{Title here}
\end{properties}
\end{minted}
\end{properties}
\begin{restrictions}[]{Title here}
\begin{minted}{latex}
\begin{restrictions}[]{Title here}
\end{restrictions}
\end{minted}
\end{restrictions}
\begin{limitations}[]{Title here}
\begin{minted}{latex}
\begin{limitations}[]{Title here}
\end{limitations}
\end{minted}
\end{limitations}
\begin{intuition}[]{Title here}
\begin{minted}{latex}
\begin{intuition}[]{Title here}
\end{intuition}
\end{minted}
\end{intuition}
Can also be used inline using \verb|\inlineintuition|, which renders \inlineintuition

View File

@@ -0,0 +1,29 @@
\vspace{1cm}
\fhlc{Aquamarine}{Language-Specific}
\begin{conjugation}[]{Title here}
\begin{minted}{latex}
\begin{conjugation}[]{Title here}
\end{conjugation}
\end{minted}
\end{conjugation}
\begin{forms}[]{Title here}
\begin{minted}{latex}
\begin{forms}[]{Title here}
\end{forms}
\end{minted}
\end{forms}
\fhlc{Aquamarine}{Flexible}
\begin{general}[]{title}{second title}{red}
This Tcolorbox is flexible and can take any main and secondary title, as well as any colour.\\
\begin{minted}{latex}
\begin{general}[]{title}{second title}{red}
\end{general}
\end{minted}
\end{general}

View File

@@ -0,0 +1,37 @@
\newpage
\subsection{Tables}
\textit{Included in \texttt{most} and up}
You can set up nice looking tables using the \texttt{booktab} and \texttt{tabulary} environments.
\begin{minted}{latex}
\begin{tables}{ll}{Left & Right}
Left content & Right Content\\
\end{tables}
\end{minted}
This outputs as
\begin{tables}{ll}{Left & Right}
Left content & Right Content \\
\end{tables}
This doesn't use the \texttt{table} environment, so no captions are possible, as to why there is also
\begin{minted}{latex}
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
\end{minted}
This outputs as
\begin{fullTable}{ll}{Left & Right}{This is a caption}
Left content & Right Content\\
\end{fullTable}
\subsection{Index}
\textit{Included in \texttt{most} and up}
If you want to use index, add \verb|\prepareIndex| to the preamble. Using \verb|\addIndexBold|\{\textit{string}\}, you can add entries to the index. They are printed in bold typeface in your document.
Using \verb|\addIndex|\{\textit{string}\}, you can do the same, but the text remains normal and using \verb|\addIndexItalic|\{\textit{string}\}, it is printed in italics

View File

@@ -1 +1,17 @@
\usepackage{minted}
\usepackage{fancyvrb}
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
\newenvironment{code}[1]{
\VerbatimEnvironment
\begin{minted}[
autogobble,
breaklines,
breakindentnchars=2,
frame=lines,
framesep=2mm,
mathescape,
baselinestretch=1.1,
linenos]{#1}}
{\end{minted}}

View File

@@ -9,14 +9,23 @@
\usepackage{algpseudocodex}
\usepackage{setspace}
\usepackage{verbatim}
\usepackage{turnstile}
\newcommand{\Indent}{\hspace{\algorithmicindent}}
\newcommand{\timecomplexity}{\fhlc{orange}{\ifnum\value{lang}<2{Time complexity}\else {Laufzeit}\fi} \hspace{0.5em}}
\newcommand{\tc}[1]{\timecomplexity $\Theta\left(#1\right)$}
\newcommand{\tct}[1]{$\Theta\left(#1\right)$}
\newcommand{\tco}[1]{$\mathcal{O}\left(#1\right)$}
\newcommand{\tcl}[1]{$\Omega\left(#1\right)$}
\newcommand{\tct}[1]{\Theta\left(#1\right)}
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
\newcommand{\wordbool}{(\Sigma_{\text{bool}})^*}
\newcommand{\words}[1]{(\Sigma_{\text{#1}})^*}
\newcommand{\word}{\Sigma^*}
\newcommand{\wordm}[1]{\Sigma_{\text{#1}}^*}
\newcommand{\alphabets}[1]{\Sigma_{\text{#1}}}
\newcommand{\alphabetbool}{\Sigma_{\text{bool}}}
\newcommand{\tR}{\text{R}}
\newcommand{\tC}{\text{C}}
\newcommand{\tN}{\text{N}}
\newcommand{\bigvdash}[2]{\sststile{#1}{#2}}
\newcommand{\class}{\text{\tr{Cl}{Kl}}}

View File

@@ -17,7 +17,7 @@
\newcommand{\E}{\mathbb{E}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\8}{\infty}
\newcommand{\dx}{\mbox{d}}
\newcommand{\dx}{\text{ d}}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
\newcommand{\hastoeq}{\overset{!}{=}}

View File

@@ -23,6 +23,11 @@
\newtcolorbox{limitations}[2][]{mainboxstyle,colback=purple!5!white,colframe=purple!75!black,colbacktitle=purple!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=purple!75!black,,fill=purple!75!black] at (frame.north east) {\large \translate{Limitations }{Limitierungen }};},#1}
\newtcolorbox{intuition}[2][]{mainboxstyle,colback=Emerald!5!white,colframe=Emerald!75!black,colbacktitle=Emerald!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=Emerald!75!black,,fill=Emerald!75!black] at (frame.north east) {\large Intuition};},#1}
\newcommand{\inlineintuition}{\bg{Emerald}{Intuition:}}
% Terms and notation
\newtcolorbox{terms}[2][]{mainboxstyle,colback=orange!5!white,colframe=orange!75!black,colbacktitle=orange!75!black,title={\large #2},

View File

@@ -19,17 +19,57 @@
\newcounter{remarks}
\newcounter{all}
\newcommand{\definitions}{definitions}
\newcommand{\useSubsection}{\ifnum\value{numberSubsections}>0{\arabic{subsection}.}\else{}\fi}
\newcommand{\useSubsubsection}{\ifnum\value{numberSubsections}>1{\arabic{subsubsection}.}\else{}\fi}
\newcommand{\usenumberArabic}[1]{\ifnum\value{numberingConfig}<4{\arabic{section}.\useSubsection\useSubsubsection\ifnum\value{numberingConfig}<3{\ifnum\value{numberingConfig}<2{\arabic{#1}\stepcounter{#1}}\else{
\ifx#1\definitions
\arabic{#1}\stepcounter{#1}
% ┌ ┐
% │ Numbering of sections │
% └
\newcommand{\subsectionRendering}{
\ifnum\value{numberSubsections}=1
\arabic{section}.\arabic{subsection}%
\else
\arabic{all}\stepcounter{all}
\fi}\fi}\else{\arabic{all}\stepcounter{all}}\fi}\else{}\fi}
\ifnum\value{numberSubsections}=2
\arabic{section}.\arabic{subsection}.\arabic{subsubsection}%
\else
\arabic{section}%
\fi
\fi}
\newcommand{\usenumberArabic}[1]{%
\ifnum\value{numberingConfig}=1
\subsectionRendering.\arabic{#1}\stepcounter{#1}%
\else
\ifnum\value{numberingConfig}=2
\ifthenelse{\equal{#1}{definitions}}{%
\subsectionRendering.\arabic{definitions}\stepcounter{definitions}%
}{%
\subsectionRendering.\arabic{all}\stepcounter{all}%
}%
\else
\ifnum\value{numberingConfig}=3
\subsectionRendering.\arabic{all}\stepcounter{all}%
\else
\relax%
\fi
\fi
\fi}
% ────────────────────────────────────────────────────────────────────
\newcounter{numberingConfigStore}
\setcounter{numberingConfigStore}{\value{numberingConfig}}
\newcommand{\setNumberingStyle}[1]{
\setcounter{numberingConfig}{#1}
\ifthenelse{\equals{#1}{0}}{
\setcounter{numberingConfigStore}{#1}
}{}
}
\newcommand{\numberingOff}{
\setcounter{numberingConfig}{0}
}
\newcommand{\numberingOn}{
\setcounter{numberingConfig}{\value{numberingConfigStore}}
}
% Reset definition, lemma, etc counters, add a new page
\newcommand{\newsection}{
@@ -54,82 +94,96 @@
\newsectionNoPB
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Tcolorboxes │
% ╰────────────────────────────────────────────────╯
% ────────────────────────────────────────────────────────────────────
% Definitions
\newtcolorbox{definition}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large Definition \usenumberArabic{definitions}};},#1}
\newtcolorbox{definition}[2][]{mainboxstyle,colback=blue!5!white,colframe=blue!75!black,colbacktitle=blue!75!black,title={\large #2},overlay={\node[overlaystyle,draw=blue!75!black,fill=blue!75!black] at (frame.north east) {\large Definition\usenumberArabic{definitions}};},#1}
% Theorems
\newtcolorbox{theorem}[2][]{mainboxstyle,colback=ForestGreen!5!white,colframe=ForestGreen!75!black,colbacktitle=ForestGreen!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde} \usenumberArabic{theorems}};},#1}
overlay={\node[overlaystyle,draw=ForestGreen!75!black,fill=ForestGreen!75!black] at (frame.north east) {\large \translate{Theorem}{\theoremde}\usenumberArabic{theorems}};},#1}
% Lemmas
\newtcolorbox{lemma}[2][]{mainboxstyle,colback=Aquamarine!5!white,colframe=Aquamarine!75!black,colbacktitle=Aquamarine!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma \usenumberArabic{lemmas}};},#1}
overlay={\node[overlaystyle,draw=Aquamarine!75!black,fill=Aquamarine!75!black] at (frame.north east) {\large Lemma\usenumberArabic{lemmas}};},#1}
% Corollaries
\newtcolorbox{corollary}[2][]{mainboxstyle,colback=teal!5!white,colframe=teal!75!black,colbacktitle=teal!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar} \usenumberArabic{corollaries}};},#1}
overlay={\node[overlaystyle,draw=teal!75!black,fill=teal!75!black] at (frame.north east) {\large \translate{Corollary}{Korollar}\usenumberArabic{corollaries}};},#1}
% Axioms
\newtcolorbox{axiom}[2][]{mainboxstyle,colback=JungleGreen!5!white,colframe=JungleGreen!75!black,colbacktitle=JungleGreen!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom \usenumberArabic{axioms}};},#1}
overlay={\node[overlaystyle,draw=JungleGreen!75!black,fill=JungleGreen!75!black] at (frame.north east) {\large Axiom\usenumberArabic{axioms}};},#1}
% Facts
\newtcolorbox{fact}[2][]{mainboxstyle,colback=SeaGreen!5!white,colframe=SeaGreen!75!black,colbacktitle=SeaGreen!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt} \usenumberArabic{facts}};},#1}
overlay={\node[overlaystyle,draw=SeaGreen!75!black,fill=SeaGreen!75!black] at (frame.north east) {\large \translate{Fact}{Fakt}\usenumberArabic{facts}};},#1}
% Propositions
\newtcolorbox{proposition}[2][]{mainboxstyle,colback=Cyan!5!white,colframe=Cyan!75!black,colbacktitle=Cyan!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition \usenumberArabic{propositions}};},#1}
overlay={\node[overlaystyle,draw=Cyan!75!black,fill=Cyan!75!black] at (frame.north east) {\large Proposition\usenumberArabic{propositions}};},#1}
% Examples
\newtcolorbox{example}[2][]{mainboxstyle,colback=gray!5!white,colframe=gray!75!black,colbacktitle=gray!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel} \usenumberArabic{examples}};},#1}
overlay={\node[overlaystyle,draw=gray!75!black,fill=gray!75!black] at (frame.north east) {\large \translate{Example}{Beispiel}\usenumberArabic{examples}};},#1}
% Formula
\newtcolorbox{formula}[2][]{mainboxstyle,colback=red!5!white,colframe=red!75!black,colbacktitle=red!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel} \usenumberArabic{formulas}};},#1}
overlay={\node[overlaystyle,draw=red!75!black,fill=red!75!black] at (frame.north east) {\large \translate{Formula}{Formel}\usenumberArabic{formulas}};},#1}
% Remark
\newtcolorbox{remark}[2][]{mainboxstyle,colback=green!5!white,colframe=green!75!black,colbacktitle=green!75!black,title={\large #2},
overlay={\node[overlaystyle,draw=green!75!black,fill=green!75!black] at (frame.north east) {\large \translate{Remark}{Bemerkung} \usenumberArabic{remarks}};},#1}
% ────────────────────────────────────────────────────────────────────
% ╭────────────────────────────────────────────────╮
% │ Inline environments │
% ╰────────────────────────────────────────────────╯
% ────────────────────────────────────────────────────────────────────
% Inline environments (inline)
\newcommand{\inlineex}{\textbf{\translate{Example}{Beispiel} \usenumberArabic{examples}:}}
\newcommand{\inlinedef}{\bg{blue}{Definition \usenumberArabic{definitions}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:}}
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:}}
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:}}
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:}}
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition \usenumberArabic{propositions}:}}
\newcommand{\inlineremark}{\bg{green}{\translate{Remark}{Bemerkung} \usenumberArabic{remarks}:}}
\newcommand{\inlineex}{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{examples}:}}
\newcommand{\inlinedef}{\bg{blue}{Definition\usenumberArabic{definitions}:}}
\newcommand{\inlineformula}{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formulas}:}}
\newcommand{\inlinelemma}{\bg{Aquamarine}{Lemma\usenumberArabic{lemmas}:}}
\newcommand{\inlinetheorem}{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorems}:}}
\newcommand{\inlineaxiom}{\bg{JungleGreen}{Axiom\usenumberArabic{axioms}:}}
\newcommand{\inlinecorollary}{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollaries}:}}
\newcommand{\inlinefact}{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{facts}:}}
\newcommand{\inlineproposition}{\bg{Cyan}{Proposition\usenumberArabic{propositions}:}}
\newcommand{\inlineremark}{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remarks}:}}
\newcommand{\inlineproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced inline environments
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel} \usenumberArabic{examples}:} \textit{(#1)}}
\newcommand{\fancydef}[1]{\bg{blue}{Definition \usenumberArabic{definitions}:} \textit{(#1)}}
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel} \usenumberArabic{formulas}:} \textit{(#1)}}
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma \usenumberArabic{lemmas}:} \textit{(#1)}}
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde} \usenumberArabic{theorems}:} \textit{(#1)}}
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom \usenumberArabic{axioms}:} \textit{(#1)}}
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar} \usenumberArabic{corollaries}:} \textit{(#1)}}
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt} \usenumberArabic{facts}:} \textit{(#1)}}
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition \usenumberArabic{propositions}:} \textit{(#1)}}
\newcommand{\fancyremark}[1]{\bg{green}{\translate{Remark}{Bemerkung} \usenumberArabic{remarks}:} \textit{(#1)}}
\newcommand{\fancyex}[1]{\bg{gray}{\translate{Example}{Beispiel}\usenumberArabic{examples}:} \textit{(#1)}}
\newcommand{\fancydef}[1]{\bg{blue}{Definition\usenumberArabic{definitions}:} \textit{(#1)}}
\newcommand{\fancyformula}[1]{\bg{red}{\translate{Formula}{Formel}\usenumberArabic{formulas}:} \textit{(#1)}}
\newcommand{\fancylemma}[1]{\bg{Aquamarine}{Lemma\usenumberArabic{lemmas}:} \textit{(#1)}}
\newcommand{\fancytheorem}[1]{\bg{ForestGreen}{\translate{Theorem}{\theoremde}\usenumberArabic{theorems}:} \textit{(#1)}}
\newcommand{\fancyaxiom}[1]{\bg{JungleGreen}{Axiom\usenumberArabic{axioms}:} \textit{(#1)}}
\newcommand{\fancycorollary}[1]{\bg{teal}{\translate{Corollary}{Korollar}\usenumberArabic{corollaries}:} \textit{(#1)}}
\newcommand{\fancyfact}[1]{\bg{SeaGreen}{\translate{Fact}{Fakt}\usenumberArabic{facts}:} \textit{(#1)}}
\newcommand{\fancyproposition}[1]{\bg{Cyan}{Proposition\usenumberArabic{propositions}:} \textit{(#1)}}
\newcommand{\fancyremark}[1]{\bg{green}{\translate{Remark}{Bemerkung}\usenumberArabic{remarks}:} \textit{(#1)}}
\newcommand{\fancyproof}[1]{\bg{magenta}{\translate{Proof}{Beweis}: \textit{(#1)}}}
% short environments (abbreviated)
\newcommand{\shortex}{\textbf{\translate{Ex}{Bsp} \usenumberArabic{examples}:}}
\newcommand{\shortdef}{\bg{blue}{D \usenumberArabic{definitions}:}}
\newcommand{\short}{\bg{red}{F \usenumberArabic{formulas}:}}
\newcommand{\shortlemma}{\bg{Aquamarine}{L \usenumberArabic{lemmas}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}} \usenumberArabic{theorems}:}}
\newcommand{\shortaxiom}{\bg{JungleGreen}{A \usenumberArabic{axioms}:}}
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K} \usenumberArabic{corollaries}:}}
\newcommand{\shortfact}{\bg{SeaGreen}{F \usenumberArabic{facts}:}}
\newcommand{\shortproposition}{\bg{Cyan}{P \usenumberArabic{propositions}:}}
\newcommand{\shortremark}{\bg{green}{\tr{R}{B} \usenumberArabic{remarks}:}}
\newcommand{\shortex}{\bg{gray}{\translate{Ex}{Bsp}\usenumberArabic{examples}:}}
\newcommand{\shortdef}{\bg{blue}{D\usenumberArabic{definitions}:}}
\newcommand{\short}{\bg{red}{F\usenumberArabic{formulas}:}}
\newcommand{\shortlemma}{\bg{Aquamarine}{L\usenumberArabic{lemmas}:}}
\newcommand{\shorttheorem}{\bg{ForestGreen}{\translate{T}{\StrMid{\theoremde}{1}{1}}\usenumberArabic{theorems}:}}
\newcommand{\shortaxiom}{\bg{JungleGreen}{A\usenumberArabic{axioms}:}}
\newcommand{\shortcorollary}{\bg{teal}{\translate{C}{K}\usenumberArabic{corollaries}:}}
\newcommand{\shortfact}{\bg{SeaGreen}{F\usenumberArabic{facts}:}}
\newcommand{\shortproposition}{\bg{Cyan}{P\usenumberArabic{propositions}:}}
\newcommand{\shortremark}{\bg{green}{\tr{R}{B}\usenumberArabic{remarks}:}}
\newcommand{\shortproof}{\bg{magenta}{\translate{Proof}{Beweis}:}}
% Enhanced short environments (abbreviated)

View File

@@ -44,6 +44,19 @@
% -------------------- %
% 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}
}
}
}
\newcommand{\rmvspace}{\vspace{-0.5pc}}
\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\TODO}{\color{red} \hl{TODO:} \color{black}}
\newcommand{\bi}[1]{\textbf{\textit{#1}}}

View File

@@ -96,6 +96,15 @@
],
"description": "Inserts a tcolorbox to inform about restrictions"
},
"Intuition": {
"prefix": "restrictions",
"body": [
"\\begin{intuition}[]{$1}",
"\t$2",
"\\end{intuition}"
],
"description": "Tcolorbox to highlight sections about intuition"
},
"Limitations": {
"prefix": "limitations",
"body": [