-
Notifications
You must be signed in to change notification settings - Fork 0
/
gfdocument.sty
106 lines (83 loc) · 2.73 KB
/
gfdocument.sty
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
% !TEX encoding = UTF-8 Unicode
% Author: Stefan Thöni
% Email: [email protected]
%-------------------------------------------------------
\ProvidesPackage{gfdocument}[2024/10/10 v2.0 (Stefan "Exception" Thöni)]
\RequirePackage{gfbasic}
\RequirePackage{xifthen}
\RequirePackage{lastpage}
\RequirePackage[absolute]{textpos}
\RequirePackage[automark]{scrlayer-scrpage}
% -----------------------------------
% Schrift und Absatz
% -----------------------------------
\setkomafont{pagefoot}{\upshape}
\setkomafont{pagehead}{\upshape}
\setkomafont{sectioning}{\bfseries}
\KOMAoptions{fontsize=11pt}
% -----------------------------------
% Farben für den Gebrauch im Dokument
% -----------------------------------
\definecolor{red}{rgb}{1,0,0}
\definecolor{black}{rgb}{0,0,0}
% -----------------------------------
% default and update values for title
% -----------------------------------
\newcommand{\headername}{\gflogosub}
\newcommand{\headerwidth}{7.8cm}
\newcommand{\titlepagespace}{3em}
% -----------------------------------
% Kopf- und fusszeile
% -----------------------------------
\KOMAoptions{headinclude=true}
\KOMAoptions{footinclude=false}
\KOMAoptions{headlines=3}
\KOMAoptions{pagesize}
\recalctypearea
\clearpairofpagestyles
\pagestyle{scrheadings}
\ihead{\vspace{-0.15cm}\smalllogost}
\ohead{\scriptsize\textbf{\small\@title} \\ \@subtitle}
\ifoot{\footnotesize\@author}
\cfoot{\footnotesize\@date}
\renewcommand{\pagemark}{\thepage{} / \pageref{LastPage}}
\ofoot{\footnotesize\pagemark}
\chead{%
\begin{textblock}{16}[0,0](0,0.7)
\centering {\Large{\textcolor{\classcolor}{\textbf{\theclassified}}}}
\end{textblock}
\begin{textblock}{16}[0,0](0,15.3)
\centering {\Large{\textcolor{\classcolor}{\textbf{\theclassified}}}}
\end{textblock}
}
\renewenvironment{titlepage}{
\thispagestyle{empty}
\if@titlepage\vspace*{\tpagemargin}\else\fi
\begin{centering}
\includegraphics[width=12cm]{\gflogost}
\vspace{2em}
{\LARGE\@title}
\vspace{1em}
\ifthenelse{\equal{\@subtitle}{}}{}{\Large\@subtitle\vspace{1em}}
\ifthenelse{\equal{\theclassified}{}}{}{\LARGE{\textcolor{\classcolor}{\textbf{\theclassified}}}\vspace{1em}}
{\Large\@author}
\vspace{1em}
{\Large\@date}
\end{centering}
\vspace{2em}
}{
\newpage
}
\renewcommand{\maketitle}{
\thispagestyle{empty}
\logonamebox{1}
\begin{flushright}
\vspace{\titlepagespace}\par\textbf{\huge\@title}
\ifthenelse{\equal{\@subtitle}{}}{}{\\ \vspace{0.1cm} {\Large\@subtitle}}
\ifthenelse{\equal{\theclassified}{}}{}{\\ \vspace{0.3cm} {\LARGE{\textcolor{\classcolor}{\textbf{\theclassified}}}}}
\par
\vspace{\titlepagespace}{\raggedleft\scriptsize\@author\hspace{1em}\@date}
\end{flushright}
\vspace{\titlepagespace}
}
\RequirePackage[a4paper,left=2cm,right=2cm,top=4cm]{geometry}