-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.tex
240 lines (209 loc) · 6.91 KB
/
header.tex
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
% !TEX root = main.tex
\usepackage{afterpage}
\usepackage{amsmath}
\usepackage[ngerman]{babel}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
% \usepackage{enumitem} % error: underfull hbox
\usepackage{eurosym}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{fontawesome}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage[pdftex]{graphicx}
%\usepackage[scaled=0.81]{helvet} % Schriftart fuer Resos
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
\usepackage{libertine}
\usepackage{lmodern} % Ersatz fuer Computer Modern-Schriften
\usepackage{mdwlist} % Änderung der Zeilenabstände bei itemize und enumerate
\usepackage{microtype}
\usepackage{minitoc}
\usepackage{outlines}
\usepackage{paralist}
\usepackage{pdfpages}
\usepackage{subcaption}
\usepackage{tcolorbox}
\usepackage{titlesec}
\usepackage{tocloft}
\usepackage{todonotes}
\usepackage{ulem}
\usepackage{url}
\usepackage{wrapfig}
\usepackage{xcolor}
\usepackage{xpatch}
% \usepackage[draft, markup=underlined]{changes}
% braucht man das?
%\usepackage{titlesec} % Abstand nach Überschriften neu definieren
%\titlespacing{\subsection}{0ex}{3ex}{-1ex}
%\titlespacing{\subsubsection}{0ex}{3ex}{-1ex}
\definecolor{urlred}{HTML}{660000}
\hypersetup{ % Design der Hyperrefs
colorlinks=true,
linkcolor=black, % Farbe der internen Links (u.a. Table of Contents)
urlcolor=black, % Farbe der url-links
citecolor=black} % Farbe der Literaturverzeichnis-Links
\parindent 0pt % Absatzeinrücken verhindern (pck:blindtext)
\parskip 2pt % Absätze durch Lücke trennen
% ToC Formatting
\pagestyle{plain}
\renewcommand\cftbeforetoctitleskip{-1cm}
\renewcommand{\cfttoctitlefont}{\Large\bfseries}
\renewcommand{\cftaftertoctitle}{\hfill\textbf{Seite}\par\noindent\textcolor{unicolor}{\hrulefill}}
\renewcommand{\cftsecleader}{\bfseries\color{unicolor}\cftdotfill{\cftdotsep}}
\renewcommand\cftchappagefont{\color{unicolor}}
\renewcommand\cftsecpagefont{\color{unicolor}}
\renewcommand\cftsubsecpagefont{\color{unicolor}}
% Suche nach Grafiken in ./media und .:
% \graphicspath{{./media/}{./}}
% Satzspiegel
\geometry{papersize={154mm,216mm}, layout=a5paper, layouthoffset=3mm, layoutvoffset=3mm, inner=20mm, outer=15mm, top=15mm, bottom=15mm, heightrounded, marginparwidth=7mm, marginparsep=5mm}
\setlength{\parindent}{0pt}
% Schriftarten
\fontfamily{pag}\selectfont % Avantgar
%\renewcommand{\sfdefault}{phv}
% \newenvironment{resofont}{\fontfamily{phv}\selectfont}{\par}
% itemize item titlespacing
% ??? ohne enumitem
% Headlines
\pagestyle{fancy}
\fancyhf{}
\definecolor{unicolor}{HTML}{B5152B}
\renewcommand{\headrulewidth}{1.5pt} % Strich unterm Header
\renewcommand{\footrulewidth}{0pt} % Strich überm Footer
\renewcommand{\chaptermark}[1]{ \markboth{\quad \quad \quad \bfseries#1 \quad \quad}{}} % chapter Titel mit "Formatierung"
\renewcommand{\sectionmark}[1]{ \markright{#1 \quad \quad \quad}{}} % section Titel mit "Formatierung"
\newlength\FHoffset
\setlength\FHoffset{1cm}
\setlength{\headheight}{22pt}
\setlength{\headsep}{5mm}
\addtolength\headwidth{2\FHoffset} % andere Länge für Header als Text
\fancyheadoffset{\FHoffset}
\fancyfootoffset{\FHoffset}
\renewcommand{\headrule}{\hbox to\headwidth{%
\color{unicolor}\leaders\hrule height \headrulewidth\hfill}}
% \xpretocmd\headrule{\color{unicolor}}{}{\PatchFailed}
\fancyhead[RO]{\large \rightmark\hspace{-0.65em}}
\fancyhead[LE]{\hspace{-0.65em}\large \leftmark}
\chead{}
% \rhead{\large \rightmark}
\fancyfoot[OR]{
\begin{tikzpicture}
\node at (0.45, 0) {\includegraphics[width=.6cm, height=.9cm]{vorlagen/logo3.png}};
\draw [thick, unicolor] (0,-0.5) -- (0,0.5);
\node at (-0.5,0) {\Large \thepage};
\end{tikzpicture}
}
\fancyfoot[EL]{
\begin{tikzpicture}
\node at (-0.55, 0) {\includegraphics[width=.6cm, height=.9cm]{vorlagen/logo3.png}};
\draw [thick, unicolor] (0,-0.5) -- (0,0.5);
\node at (0.5,0) {\Large \thepage};
\end{tikzpicture}
}
% Boxen etwa für Abstimmungen in Plenen
\newenvironment{success}[1]{
\begin{center}
\begin{tcolorbox}[colback=green!5!white,colframe=green!60!black, title=#1]
}
{
\end{tcolorbox}
\end{center}
}
\newenvironment{info}[1]{
\begin{center}
\begin{tcolorbox}[colback=blue!5!white,colframe=blue!60!black, title=#1]
}
{
\end{tcolorbox}
\end{center}
}
\newenvironment{danger}[1]{
\begin{center}
\begin{tcolorbox}[colback=yellow!5!white,colframe=yellow!75!black, title=#1]
}
{
\end{tcolorbox}
\end{center}
}
% Chapter Formatting
\newcommand{\tocchapter}{
\titlespacing*{\chapter}{0pt}{-5pt}{40pt}
\titleformat{\chapter}[display]
{\normalfont\bfseries\scshape\filcenter}
{\Huge\thechapter}
{1ex}
{\color{unicolor}\titlerule[7pt]
\vspace{4ex}%
\color{black}
\Huge}
[\vspace{1ex}%
\color{unicolor}
{\titlerule[7pt]}
\setlength{\mtcindent}{-14pt}
\vspace{1cm}
\minitoc
\vfill
{\includegraphics[scale=0.2]{vorlagen/logo.png}}
{\thispagestyle{empty} \newpage}]
\assignpagestyle{\chapter}{empty}
}
\newcommand{\emptychapter}{
\titleformat{\chapter}[display]
{\normalfont\bfseries\scshape\filcenter}
{\Huge\thechapter}
{1ex}
{\color{unicolor}\titlerule[7pt]
\vspace{4ex}%
\color{black}
\Huge}
[\vspace{1ex}%
\color{unicolor}
{\titlerule[7pt]}
\vspace{7cm}
{\includegraphics[scale=0.4]{vorlagen/logo.png}}
{\newpage}]
\assignpagestyle{\chapter}{empty}
}
\newcommand{\lastchapter}{
\titleformat{\chapter}[display]
{\normalfont\bfseries\scshape\filcenter}
{\Huge\thechapter}
{1ex}
{\color{unicolor}\titlerule[7pt]
\vspace{4ex}%
\color{black}
\Huge}
[\vspace{1ex}%
\color{unicolor}
{\titlerule[7pt]}
\vspace{7cm}
{\includegraphics[scale=0.4]{vorlagen/logo.png}}
{}]
\assignpagestyle{\chapter}{empty}
}
% used for resos and pospaps
% \pagestyle{empty}
% \cfoot{}
% \lfoot{Zusammenkunft aller Physik-Fachschaften}
% \rfoot{www.zapfev.de\\[email protected]}
% \renewcommand{\headrulewidth}{0pt}
% \renewcommand{\footrulewidth}{0.1pt}
% \newcommand{\gen}{*innen}
% Section und Subsection Nummern
\setcounter{secnumdepth}{2}
% \renewcommand\thesection{\colorbox{unicolor}{\textcolor{white}{\arabic{section}}}\textcolor{unicolor}{|}}
\renewcommand\thesection{
\ifnum\value{section}<10
{\hbox{\,\,\,}\textcolor{gray}{\textbf{\arabic{section}}}\textcolor{unicolor}{\textbf{ |}}}
\else
{\textcolor{gray}{\textbf{\arabic{section}}}\textcolor{unicolor}{\textbf{ |}}}
\fi}
% \renewcommand\thesection{\textcolor{gray}{\textbf{\arabic{section}}}\textcolor{unicolor}{\textbf{ |}}}
% \renewcommand\thesubsection{\fcolorbox{unicolor}{white}{\textcolor{gray}{\Roman{subsection}}}}
\renewcommand\thesubsection{\textcolor{gray}{\Roman{subsection} }}
%Section or subsection with number but no toc entry
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}