[skip ci] Build helpers on push
This commit is contained in:
112
main/core.tex
112
main/core.tex
@@ -46,32 +46,32 @@
|
||||
\newcounter{lang}
|
||||
|
||||
\newcommand{\setLang}[1]{
|
||||
\edef\lang{#1}
|
||||
\edef\en{en}
|
||||
\edef\de{de}
|
||||
\ifx\lang\en
|
||||
\typeout{[Lang Switcher] Loading English}
|
||||
\setcounter{lang}{1}
|
||||
\else
|
||||
\ifx\lang\de
|
||||
\typeout{[Lang Switcher] Loading German}
|
||||
\setcounter{lang}{2}
|
||||
\usepackage[ngerman]{babel}
|
||||
\else
|
||||
\typeout{[Lang Switcher] No such language!}
|
||||
\fi
|
||||
\fi
|
||||
\edef\lang{#1}
|
||||
\edef\en{en}
|
||||
\edef\de{de}
|
||||
\ifx\lang\en
|
||||
\typeout{[Lang Switcher] Loading English}
|
||||
\setcounter{lang}{1}
|
||||
\else
|
||||
\ifx\lang\de
|
||||
\typeout{[Lang Switcher] Loading German}
|
||||
\setcounter{lang}{2}
|
||||
\usepackage[ngerman]{babel}
|
||||
\else
|
||||
\typeout{[Lang Switcher] No such language!}
|
||||
\fi
|
||||
\fi
|
||||
}
|
||||
|
||||
% Deprecated, as not useful
|
||||
\newcommand{\loadLang}{
|
||||
\ifnum\value{lang}<2{
|
||||
\typeout{[Lang Loader] Loaded English}
|
||||
}\else {
|
||||
\typeout{[Lang Loader] Loaded German}
|
||||
\setcounter{lang}{2}
|
||||
}
|
||||
\fi
|
||||
\ifnum\value{lang}<2{
|
||||
\typeout{[Lang Loader] Loaded English}
|
||||
}\else {
|
||||
\typeout{[Lang Loader] Loaded German}
|
||||
\setcounter{lang}{2}
|
||||
}
|
||||
\fi
|
||||
}
|
||||
|
||||
|
||||
@@ -85,56 +85,56 @@
|
||||
% ── Setup ───────────────────────────────────────────────────────────
|
||||
% Set up the latex document, configure author, title (as first argument), as well as headers and footers
|
||||
\newcommand{\setup}[1]{
|
||||
\typeout{[Setup] Setting up...}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
\fancyhead{}
|
||||
\fancyhead[L]{#1}
|
||||
\fancyhead[R]{\authorHeaders}
|
||||
\fancyfoot{}
|
||||
\fancyfoot[L]{\today}
|
||||
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhead{}
|
||||
\fancyhead[L]{#1}
|
||||
\fancyhead[R]{\authorHeaders}
|
||||
\fancyfoot{}
|
||||
\fancyfoot[L]{\today}
|
||||
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
|
||||
}
|
||||
\typeout{[Setup] Complete}
|
||||
\typeout{[Setup] Setting up...}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
\fancyhead{}
|
||||
\fancyhead[L]{#1}
|
||||
\fancyhead[R]{\authorHeaders}
|
||||
\fancyfoot{}
|
||||
\fancyfoot[L]{\today}
|
||||
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhead{}
|
||||
\fancyhead[L]{#1}
|
||||
\fancyhead[R]{\authorHeaders}
|
||||
\fancyfoot{}
|
||||
\fancyfoot[L]{\today}
|
||||
\fancyfoot[R]{\thepage\ /\ \pageref{LastPage}}
|
||||
}
|
||||
\typeout{[Setup] Complete}
|
||||
}
|
||||
|
||||
% Start document command (required)
|
||||
\newcommand{\startDocument}{
|
||||
\maketitle
|
||||
\startDocumentNoTitle
|
||||
\maketitle
|
||||
\startDocumentNoTitle
|
||||
}
|
||||
|
||||
% Or this one, if you don't want a title
|
||||
\newcommand{\startDocumentNoTitle}{
|
||||
\pagestyle{fancy}
|
||||
\thispagestyle{fancy}
|
||||
\pagestyle{fancy}
|
||||
\thispagestyle{fancy}
|
||||
}
|
||||
|
||||
% Set up the latex document, only configuring the author, title and page size
|
||||
\newcommand{\setupBarebones}[1]{
|
||||
\typeout{[Setup] Using barebones setup}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
\typeout{[Setup] Using barebones setup}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=17.5cm,textheight=25cm,includehead]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
}
|
||||
|
||||
% Set up the latex document for exam summaries (Extra wide body, small margins, no header)
|
||||
\newcommand{\setupCheatSheet}[1]{
|
||||
\typeout{[Setup] Using CheatSheet setup}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
\typeout{[Setup] Using CheatSheet setup}
|
||||
\loadLang
|
||||
\usepackage[a4paper,textwidth=20cm,textheight=28.5cm]{geometry}
|
||||
\title{\Huge \textbf{#1}}
|
||||
\author{\authorTitle}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user