Get working
This commit is contained in:
@@ -22,21 +22,17 @@
|
||||
% You may here configure how they are generated. #1 is the full name.
|
||||
\newcommand{\shortDescriptorNameTemplate}[1]{\StrBefore[1]{#1}}
|
||||
|
||||
% Decide if the numbering should show a space preceding it.
|
||||
% \newcommand{\useSpaceBeforeNumbering}{true}
|
||||
% TODO: Remove above if works without
|
||||
|
||||
% Specify how the inline and short descriptors (e.g. Lemma, etc) are rendered.
|
||||
% - #1 is the name of the descriptor
|
||||
% - #2 is the number (correctly rendered according to settings and preceded with space if not disabled)
|
||||
% - #3 is the name passed (non-empty asserted)
|
||||
\newcommand{\shortDescriptorTemplate}[4]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2} \textit{(#3)}\ }
|
||||
\newcommand{\inlineDescriptorTemplate}[4]{\bg{#1color}{#1#2}: \textit{(#3)}\ }
|
||||
\newcommand{\shortDescriptorTemplate}[3]{\bg{#1color}{\shortDescriptorNameTemplate{\namingTranslate{#1}} #2} \textit{(#3)}}
|
||||
\newcommand{\inlineDescriptorTemplate}[3]{\bg{#1color}{\namingTranslate{#1} #2}: \textit{(#3)}}
|
||||
|
||||
% These are used if no name is provided and argument #4 from above is the missing argument
|
||||
\newcommand{\anonymousShortDescriptorTemplate}[3]{\bg{#1color}{\shortDescriptorNameTemplate{#1}#2}\ }
|
||||
\newcommand{\anonymousInlineDescriptorTemplate}[3]{\bg{#3color}{#1#2}\ }
|
||||
\newcommand{\anonymousShortDescriptorTemplate}[2]{\bg{#1color}{\shortDescriptorNameTemplate{\namingTranslate{#1}} #2}}
|
||||
\newcommand{\anonymousInlineDescriptorTemplate}[2]{\bg{#1color}{\namingTranslate{#1} #2}}
|
||||
|
||||
% background command config (draws a small box around the content)
|
||||
\newcommand{\backgroundPadding}{2pt}
|
||||
\newcommand{\backgroundRounding}{0.1pt}
|
||||
\newcommand{\backgroundRounding}{1pt}
|
||||
|
||||
@@ -32,3 +32,6 @@
|
||||
\newcommand{\currentLanguage}{en}
|
||||
|
||||
\setcounter{secnumdepth}{4}
|
||||
|
||||
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
|
||||
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
|
||||
|
||||
@@ -47,7 +47,38 @@
|
||||
% └ ┘
|
||||
% Start document command (required)
|
||||
\newcommand{\startDocument}{
|
||||
% TODO: Cheat sheet needs different setup
|
||||
\maketitle
|
||||
\pagestyle{fancy}
|
||||
\thispagestyle{fancy}
|
||||
|
||||
\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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
% │ Translation │
|
||||
% └ ┘
|
||||
\newcommand{\translate}[2]{%
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}
|
||||
\ifthenelse{\equal{\currentLanguage}{en}}{#1}{#2}%
|
||||
}
|
||||
\newcommand{\tr}[2]{\translate{#1}{#2}}
|
||||
\newcommand{\namingTranslate}[1]{\translate{\printTranslationOptionEN{#1}}{\printTranslationOptionEN{#1}}}
|
||||
|
||||
% Translation aids (commonly used)
|
||||
\newcommand{\trif}{\translate{if }{falls }}
|
||||
|
||||
@@ -1,39 +1,6 @@
|
||||
% ┌ ┐
|
||||
% │ STYLE: Globals │
|
||||
% └ ┘
|
||||
% Global style configs for tcolorbox (to reduce bloat)
|
||||
% \AtBeginDocument{
|
||||
% \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
|
||||
% }
|
||||
% }
|
||||
% }
|
||||
|
||||
% ── Fonts ───────────────────────────────────────────────────────────
|
||||
\newcommand{\setFont}[1]{\fontfamily{#1}\selectfont}
|
||||
\newcommand{\setFontType}[1]{
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
% ── Label generator ─────────────────────────────────────────────────
|
||||
\newcommand{\printNumberingConfigForDescriptor}[1]{\csname #1numbering\endcsname}
|
||||
\newcommand{\printCounter}[1]{\csname the#1\endcsname}
|
||||
\newcommand{\printCounter}[1]{\refstepcounter{#1}\csname the#1\endcsname}
|
||||
|
||||
\newcommand{\printLabel}[1]{%
|
||||
\ifcsdef{#1numbering}{% Extra config present
|
||||
% TODO: Increment
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{default}}{%
|
||||
\printCounter{#1\subsectionnumbering}%
|
||||
}{
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{separate}}{%
|
||||
\printCounter{#1\subsectionnumbering}%
|
||||
}{
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{
|
||||
}{%
|
||||
\ifthenelse{\equal{\printNumberingConfigForDescriptor{#1}}{combined}}{%
|
||||
\printCounter{combined\subsectionnumbering}%
|
||||
}{}
|
||||
}
|
||||
}
|
||||
}{}%
|
||||
}%
|
||||
}%
|
||||
}{%
|
||||
\labelPrintBackendRoutine{#1}%
|
||||
}
|
||||
}%
|
||||
}
|
||||
\newcommand{\labelPrintBackendRoutine}[1]{
|
||||
\ifthenelse{\equal{\numberingpreset}{combined}}{
|
||||
@@ -31,9 +30,6 @@
|
||||
}
|
||||
|
||||
% Inline environments (inline)
|
||||
\newcommand{\printTranslationOptionEN}[1]{\csname #1NamingEN\endcsname}
|
||||
\newcommand{\printTranslationOptionDE}[1]{\csname #1NamingDE\endcsname}
|
||||
|
||||
\newcommand{\inline}[2][NONAME]{%
|
||||
\ifthenelse{\equal{NONAME}{#1}}{%
|
||||
\anonymousInlineDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||
@@ -42,8 +38,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
\newcommand{\short}[2][__NONAME__]{%
|
||||
\ifthenelse{\equal{__NONAME__}{#1}}{%
|
||||
\newcommand{\short}[2][NONAME]{%
|
||||
\ifthenelse{\equal{NONAME}{#1}}{%
|
||||
\anonymousShortDescriptorTemplate{#2}{\printLabel{#2}}%
|
||||
}{%
|
||||
\shortDescriptorTemplate{#2}{\printLabel{#2}}{#1}%
|
||||
|
||||
Reference in New Issue
Block a user