diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-09-27 13:49:10 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-09-27 13:49:10 +0200 |
| commit | aa84ba7c1d654753f65d00494e97446e1e752e92 (patch) | |
| tree | 5d01e1710dc137385939251de579e27f4c1fffad /latex | |
| parent | 142ae9a2e1cf0aa2883b338265a3ad75ba1ed84c (diff) | |
| download | unterricht-aa84ba7c1d654753f65d00494e97446e1e752e92.tar.gz unterricht-aa84ba7c1d654753f65d00494e97446e1e752e92.zip | |
support passing the lehrerversion toggle via env
Diffstat (limited to 'latex')
| -rw-r--r-- | latex/common_options.tex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/latex/common_options.tex b/latex/common_options.tex index b76dd419..a32368a8 100644 --- a/latex/common_options.tex +++ b/latex/common_options.tex @@ -7,6 +7,31 @@ \ProcessOptions\relax +\RequirePackage{xparse} + +\ExplSyntaxOn + +\NewDocumentCommand{\getenv}{om} + { + \sys_get_shell:nnN { kpsewhich ~ --var-value ~ #2 } { } \l_tmpa_tl + \tl_trim_spaces:N \l_tmpa_tl + \IfNoValueTF { #1 } + { + \tl_use:N \l_tmpa_tl + } + { + \tl_set_eq:NN #1 \l_tmpa_tl + } + } + +\ExplSyntaxOff + +\getenv[\lehrerversionEnv]{LESSON_LEHRERVERSION} + +\ifdefstring{\lehrerversionEnv}{true}{ + \toggletrue{lehrerversion}% +}{} + \iftoggle{debug}{ \RequirePackage{showframe} % Seitenlayout anzeigen }{} |
