Update docs (mostly), fixes, etc
This commit is contained in:
@@ -1,148 +0,0 @@
|
||||
% ── Label generator ─────────────────────────────────────────────────
|
||||
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
|
||||
\newcommand{\printCounter}[1]{\refstepcounter{#1}\csname the#1\endcsname}
|
||||
|
||||
\newcommand{\printLabel}[1]{%
|
||||
\ifthenelse{\boolean{numberingDisabled}}{}{
|
||||
\ifcsdef{#1numbering}{% Extra config present
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
|
||||
\labelPrintBackendRoutine{#1}%
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{%
|
||||
\printCounter{#1\subsectionnumbering}%
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
|
||||
\printCounter{combined\subsectionnumbering}%
|
||||
}{}%
|
||||
}%
|
||||
}%
|
||||
}{%
|
||||
\labelPrintBackendRoutine{#1}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
\newcommand{\labelPrintBackendRoutine}[1]{%
|
||||
\ifthenelse{\equal{\numberingpreset}{combined}}{%
|
||||
\printCounter{combined\subsectionnumbering}%
|
||||
}{
|
||||
\ifthenelse{\equal{\numberingpreset}{separate}}{%
|
||||
\printCounter{#1\subsectionnumbering}%
|
||||
}{}%
|
||||
}%
|
||||
}
|
||||
|
||||
% ── Set the current number of a label ───────────────────────────────
|
||||
\newcommand{\setLabelNumber}[2]{%
|
||||
\setcounter{#1none}{#2}%
|
||||
\addtocounter{#1none}{-1}%
|
||||
\setcounter{#1section}{#2}%
|
||||
\addtocounter{#1section}{-1}%
|
||||
\setcounter{#1subsection}{#2}%
|
||||
\addtocounter{#1subsection}{-1}%
|
||||
\setcounter{#1subsubsection}{#2}%
|
||||
\addtocounter{#1subsubsection}{-1}%
|
||||
\setcounter{#1paragraph}{#2}%
|
||||
\addtocounter{#1paragraph}{-1}%
|
||||
}
|
||||
|
||||
\newcommand{\stepLabelNumber}[1]{%
|
||||
\stepcounter{#1none}%
|
||||
\stepcounter{#1section}%
|
||||
\stepcounter{#1subsection}%
|
||||
\stepcounter{#1subsubsection}%
|
||||
\stepcounter{#1paragraph}%
|
||||
}
|
||||
|
||||
% ┌ ┐
|
||||
% │ Counter numbering │
|
||||
% └ ┘
|
||||
\newcommand{\preEnvHook}[1]{%
|
||||
\ifthenelse{\boolean{numberingDisabled}}{}{
|
||||
\ifthenelse{\equal{\numberingpreset}{combined} \AND \equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
|
||||
\stepLabelNumber{combined}%
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
|
||||
\stepLabelNumber{combined}%
|
||||
}{}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
% Decides on the numbering to use (combined or not)
|
||||
\newcommand{\tableAndFigureNumberingHelper}[1]{%
|
||||
\ifthenelse{\boolean{numberingDisabled}}{}{
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{default}}}{% Using default
|
||||
\ifthenelse{\equal{\numberingpreset}{combined}}{%
|
||||
\tableAndFigureSubsectionPrinting{\value{combined\subsectionnumbering}}%
|
||||
}{%
|
||||
\ifthenelse{\equal{\numberingpreset}{separate}}{%
|
||||
\tableAndFigureSubsectionPrinting{\value{#1}}%
|
||||
}{}%
|
||||
}%
|
||||
}{% if we get here, default has been changed
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{combined}}}{%
|
||||
\tableAndFigureSubsectionPrinting{\value{combined\subsectionnumbering}}%
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}{separate}}}{%
|
||||
\tableAndFigureSubsectionPrinting{\value{#1}}%
|
||||
}{}%
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
% Prints the preceding subsection numbers
|
||||
\newcommand{\tableAndFigureSubsectionPrinting}[1]{%
|
||||
\ifthenelse{\equal{\subsectionnumbering}{section}}{%
|
||||
\thesection.#1%
|
||||
}{%
|
||||
\ifthenelse{\equal{\subsectionnumbering}{subsection}}{%
|
||||
\thesubsection.#1%
|
||||
}{%
|
||||
\ifthenelse{\equal{\subsectionnumbering}{subsubsection}}{%
|
||||
\thesubsubsection.#1%
|
||||
}{%
|
||||
\ifthenelse{\equal{\subsectionnumbering}{paragraph}}{%
|
||||
\theparagraph.#1
|
||||
}{%
|
||||
#1
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}%
|
||||
}
|
||||
|
||||
\renewcommand{\thetable}{\tableAndFigureNumberingHelper{table}}
|
||||
\renewcommand{\thefigure}{\tableAndFigureNumberingHelper{figure}}
|
||||
|
||||
\AtBeginEnvironment{table}{\preEnvHook{table}}
|
||||
\AtBeginEnvironment{figure}{\preEnvHook{figure}}
|
||||
|
||||
|
||||
\newcommand{\newsection}{%
|
||||
\newpage
|
||||
\newsectionNoPB
|
||||
}
|
||||
|
||||
\newcommand{\newsectionNoPB}{
|
||||
\ifthenelse{\equal{\numberingpreset}{off}}{}{%
|
||||
\resetNumbering%
|
||||
}%
|
||||
}
|
||||
|
||||
\newcommand{\resetTableAndFigureNumbering}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{table}}{combined} \OR \equal{\printNumberingConfigForDescriptor{table}{default}}}{%
|
||||
\setcounter{table}{0}
|
||||
}{}%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{figure}}{combined} \OR \equal{\printNumberingConfigForDescriptor{figure}{default}}}{%
|
||||
\setcounter{figure}{0}
|
||||
}{}%
|
||||
}
|
||||
|
||||
|
||||
% Numbering toggling
|
||||
\newboolean{numberingDisabled}
|
||||
\setboolean{numberingDisabled}{false}
|
||||
\newcommand{\numberingOff}{\setboolean{numberingDisabled}{true}}
|
||||
\newcommand{\numberingOn}{\setboolean{numberingDisabled}{false}}
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
\newcommand{\Indent}{\hspace{\algorithmicindent}}
|
||||
|
||||
\newcommand{\tc}[1]{\tco{#1}}
|
||||
\newcommand{\tct}[1]{\Theta\left(#1\right)}
|
||||
\newcommand{\tco}[1]{\mathcal{O}\left(#1\right)}
|
||||
\newcommand{\tcl}[1]{\Omega\left(#1\right)}
|
||||
|
||||
@@ -66,29 +66,28 @@
|
||||
\newcommand{\dx}{\text{ d}}
|
||||
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
|
||||
\newcommand{\ceil}[1]{\left\lceil #1 \right\rceil}
|
||||
\newcommand{\hastoeq}{\overset{!}{=}}
|
||||
\newcommand{\Leftrightarrowequiv}{\overset{\cdot}{\Leftrightarrow}}
|
||||
\newcommand{\Longleftrightarrowequiv}{\overset{\cdot}{\Longleftrightarrow}}
|
||||
\newcommand{\Rightarrowequiv}{\overset{\cdot}{\Rightarrow}}
|
||||
\newcommand{\Leftarrowequiv}{\overset{\cdot}{\Leftarrow}}
|
||||
\newcommand{\defAs}{\overset{\text{def}}{=}}
|
||||
\newcommand{\der}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
|
||||
\newcommand{\dern}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
|
||||
\newcommand{\parder}[1]{\frac{\partial}{\partial #1}}
|
||||
\newcommand{\pardern}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
|
||||
\newcommand{\defEquiv}{\overset{\text{def}}{\Leftrightarrow}}
|
||||
\newcommand{\defImplies}{\overset{\text{def}}{\Rightarrow}}
|
||||
\newcommand{\divides}{\hspace{0.25em}|\hspace{0.25em}}
|
||||
\newcommand{\diff}[1]{\frac{\mbox{d}}{\mbox{d}#1}}
|
||||
\newcommand{\diffn}[2]{\frac{\mbox{d}^{#2}}{\mbox{d}^{#2}#1}}
|
||||
\newcommand{\pardiff}[1]{\frac{\partial}{\partial #1}}
|
||||
\newcommand{\pardiffn}[2]{\frac{\partial^{#2}}{\partial^{#2} #1}}
|
||||
\newcommand{\divider}{\hspace{0.25em}|\hspace{0.25em}}
|
||||
\newcommand{\lcm}{\text{lcm}}
|
||||
\newcommand{\limit}[2]{\underset{#1 \rightarrow #2}{\lim}}
|
||||
\newcommand{\seq}[1]{(#1_n)_{n \geq 1}}
|
||||
\newcommand{\ser}[2]{\sum_{k = 1}^{#2} #1_k}
|
||||
\newcommand{\limni}{\limit{n}{\infty}}
|
||||
\newcommand{\limnz}{\limit{n}{0}}
|
||||
\newcommand{\limxz}{\limit{x_0}{0}}
|
||||
\newcommand{\limhz}{\limit{h}{0}}
|
||||
\newcommand{\liminfni}{\liminf_{n \rightarrow \infty}}
|
||||
\newcommand{\limsupni}{\limsup_{n \rightarrow \infty}}
|
||||
\newcommand{\sequence}[1]{(#1_n)_{n \geq 1}}
|
||||
\newcommand{\series}[2]{\sum_{k = 1}^{#2} #1_k}
|
||||
|
||||
\DeclareMathOperator\arctanh{arctanh}
|
||||
\DeclareMathOperator\arccosh{arccosh}
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
\RequirePackage{minted}
|
||||
\RequirePackage{fancyvrb}
|
||||
|
||||
% Args: Code.
|
||||
% Alternative: Use \mint{<language>}|code|
|
||||
\newcommand{\inlinecode}[1]{\shade{gray}{\texttt{#1}}}
|
||||
|
||||
% Args: Language, Code
|
||||
\newenvironment{code}[1]{
|
||||
\VerbatimEnvironment
|
||||
|
||||
@@ -33,11 +33,18 @@
|
||||
}
|
||||
|
||||
|
||||
% TODO: Use landscape and columns for new version
|
||||
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
|
||||
\newcommand{\setupCheatSheet}[1]{
|
||||
\RequirePackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\newcommand{\setupCheatSheet}[2][true]{
|
||||
\ifthenelse{\equal{#1}{true}}{
|
||||
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm,landscape]{geometry}
|
||||
\RequirePackage{flowfram}
|
||||
\ffvadjustfalse
|
||||
\setlength{\columnsep}{1cm}
|
||||
\Ncolumn{3}
|
||||
}{
|
||||
\RequirePackage[a4paper,textwidth=28.5cm,textheight=20cm]{geometry}
|
||||
}
|
||||
\title{\Huge \textbf{#2}}
|
||||
\author{\authorTitle}
|
||||
}
|
||||
|
||||
@@ -47,7 +54,7 @@
|
||||
% └ ┘
|
||||
% Start document command (required)
|
||||
\newcommand{\startDocument}{
|
||||
% TODO: Cheat sheet needs different setup
|
||||
% TODO: Cheat sheet needs different setup?
|
||||
\maketitle
|
||||
\pagestyle{fancy}
|
||||
\thispagestyle{fancy}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
\newcommand{\namingTranslate}[1]{\translate{\printTranslationOptionEN{#1}}{\printTranslationOptionEN{#1}}}
|
||||
\newcommand{\shortNamingTranslate}[1]{\translate{\printShortTranslationOptionEN{#1}}{\printShortTranslationOptionEN{#1}}}
|
||||
|
||||
% Translation aids (commonly used)
|
||||
\newcommand{\trif}{\translate{if }{falls }}
|
||||
|
||||
Reference in New Issue
Block a user