-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharbeitsblatt.cls
executable file
·63 lines (49 loc) · 1.28 KB
/
arbeitsblatt.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{arbeitsblatt}
\LoadClass{article}
% Pakete
\RequirePackage{einstellungen}
\RequirePackage{pgfplots}
\pgfplotsset{compat=1.18}
\newboolean{A5}
\newboolean{landscape}
\DeclareOption{A5}{\setboolean{A5}{true}}
\DeclareOption{landscape}{\setboolean{landscape}{true}}
\ProcessOptions\relax
\newcommand{\thema}[1]{\def\thema{#1}}
\newcommand{\lerngruppe}[1]{\def\lerngruppe{#1}}
\pagenumbering{gobble}
\ifthenelse{\boolean{landscape}}
{
\geometry{a4paper,bottom=2.5cm,top=2.5cm,left=2.5cm,right=2.5cm,headheight=6pt,landscape}
}{
\geometry{a4paper,bottom=2.5cm,top=2.5cm,left=2.5cm,right=2.5cm,headheight=6pt}
}
\ifthenelse{\boolean{A5}}{
\ifthenelse{\boolean{landscape}}{
\pgfpagesuselayout{2 on 1}[a4paper]
}{
\pgfpagesuselayout{2 on 1}[a4paper, landscape]
}
\AtBeginShipout{
\pgfpagesshipoutlogicalpage{1}\copy\AtBeginShipoutBox
\pgfpagesshipoutlogicalpage{2}\box\AtBeginShipoutBox
\pgfshipoutphysicalpage
}
}{}
\newcommand{\setheader}{
\pagestyle{fancy}
\xpretocmd\headrule{\color{lightgray}}{}{\PatchFailed}
\lhead{\large {\headerfont\thema}}
\rhead{\color{gray}\large {\headerfont\lerngruppe}}
\chead{}
}
\newcommand{\setfooter}{
\fancyfoot{}
}
\AtBeginDocument{%
\setheader
}
\AtEndDocument{%
\setfooter
}