Newer
Older
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
% \iffalse this-is-a-meta-comment-intended-for-humans
%
% Copyright (C) 2017 Roland Hieber <rohieb+latex@rohieb.name>
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% and version 1.3 or later is part of all distributions of
% LaTeX version 2005/12/01 or later.
%
% \fi
%
\def\thisclass{s0artcl}
\def\thisfile{\thisclass.dtx}
% \iffalse
%<*driver>
\ProvidesFile{\thisfile}
%</driver>
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{\thisclass}
%<*class>
[2017/02/21 v1.00 Stratum 0 Corporate Identity -- Article]
%</class>
%
%<*driver>
\documentclass{scrdoc}
\usepackage{hyperref}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{\thisfile}
\end{document}
%</driver>
% \fi
%
% \changes{v1.0}{2017/02/21}{Initial version}
%
% \GetFileInfo{\thisfile}
%
% \title{The \textsf{\thisclass} class\thanks{This document corresponds to
% \textsf{\thisclass}~\fileversion, dated \filedate.}}
% \author{Roland Hieber \\ \url{rohieb+stratum0-latex-qua1aiMe@rohieb.name>}}
%
% \maketitle
% \tableofcontents
%
% \section{Introduction}
% This document class is part of the Stratum 0 Corporate Identity and can be used to
% typeset general documents.
%
% \section{Package Options}
% This class extends the \textsf{scrartcl} class, and knows every option that \textsf{scrartcl}
% knows. Refer to the \textsf{KOMA-Script} manual for more information.
%
% \StopEventually{\PrintChanges}
%
% \section{Implementation}
% \subsection{Option Parsing}
% Pass default options to \textsf{scrartcl}:
% \begin{macrocode}
\PassOptionsToClass{a4paper}{scrartcl}
\PassOptionsToClass{11pt}{scrartcl}
\PassOptionsToClass{parskip=half-}{scrartcl}
% \end{macrocode}
%
% Read all the documentclass options; pass them to \textsf{scrartcl}, unless the file
% |<currentoption>.s0c| exists, then it is loaded.
% \begin{macrocode}
\DeclareOption*{\InputIfFileExists{\CurrentOption.s0c}{}{%
\PassOptionsToClass{\CurrentOption}{scrartcl}}}
\ProcessOptions \relax
\LoadClass{scrartcl}
% \end{macrocode}
%
% \subsection{General Helper Packages}
% \begin{macrocode}
\RequirePackage{xpatch}
\RequirePackage{hyperref}
\hypersetup{unicode=true,colorlinks=false,pdfborder=0 0 0}
\urlstyle{sf}
% \end{macrocode}
%
% \subsection{Page Layout}
% \begin{macrocode}
\RequirePackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2.5cm]{geometry}
% \end{macrocode}
%
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
% \subsection{Headings and Footers}
% We want to translate the footer:
% \begin{macrocode}
\RequirePackage{lastpage}
\def\sn@pagenameof@english#1{Page #1 of \pageref{LastPage}}
\let\sn@pagenameof@UKenglish\sn@pagenameof@english
\let\sn@pagenameof@american\sn@pagenameof@english
\let\sn@pagenameof@USenglish\sn@pagenameof@english
\let\sn@pagenameof@british\sn@pagenameof@english
\let\sn@pagenameof@canadian\sn@pagenameof@english
\let\sn@pagenameof@australian\sn@pagenameof@english
\let\sn@pagenameof@newzealand\sn@pagenameof@english
\def\sn@pagenameof@german#1{Seite #1 von \pageref{LastPage}}
\let\sn@pagenameof@ngerman\sn@pagenameof@german
\let\sn@pagenameof@austrian\sn@pagenameof@german
\let\sn@pagenameof@germanb\sn@pagenameof@german
\let\sn@pagenameof@naustrian\sn@pagenameof@german
% \end{macrocode}
%
% We define english as our default language.
% If \textsf{babel} is loaded with a new language, this gets overwritten.
% \begin{macrocode}
\ifx\languagename\undefined\def\languagename{english}\fi
% \end{macrocode}
%
% Now for the real header setup:
% \begin{macrocode}
\RequirePackage[headsepline]{scrlayer-scrpage}[2013/12/27]
\ihead{\textsc{\@title}}
\chead{}
\ohead{\textsc{\@date}}
\ifoot{}
\cfoot*{\csname sn@pagenameof@\languagename\endcsname\thepage}
\ofoot{}
\pagestyle{scrheadings}
% \end{macrocode}
%
% \subsection{Optimize Vertical Spacing}
% \begin{macrocode}
\RedeclareSectionCommand[afterskip=0.5em]{section}
\RedeclareSectionCommand[afterskip=0.1em]{subsubsection}
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
\RedeclareSectionCommand[beforeskip=.5\parskip, afterskip=-1em]{paragraph}
\setlength{\parindent}{0em}
\RequirePackage{enumitem}
\setlist{nosep}
\RequirePackage{tocloft}
\setlength{\cftbeforesecskip}{0.3\baselineskip}
% \end{macrocode}
%
% \textsf{tocloft} renders the table of contents header in serif font...
% \begin{macrocode}
\renewcommand{\cfttoctitlefont}{\usekomafont{section}}
% \end{macrocode}
%
% \subsection{Default Fonts}
% Yanone Kaffeesatz ZeroHack for titles etc.
% \begin{macrocode}
\RequirePackage{yanonekaffeesatzzerohack}
\setkomafont{title}{\usefont{LY1}{YanoneKaffeesatzZeroHack}{b}{n}}
\setkomafont{subtitle}{\usefont{LY1}{YanoneKaffeesatzZeroHack}{l}{n}\Large}
\setkomafont{subject}{\normalfont\large}
\setkomafont{author}{\normalfont\large}
\setkomafont{date}{\normalfont\large}
% \end{macrocode}
%
% Workaround because \textsf{KOMA-Script} has an explicit |\huge\@title| in |\maketitle|\ldots
% (see \url{http://tex.stackexchange.com/a/82851})
% \begin{macrocode}
\xpatchcmd{\maketitle}{\huge}{\Huge}{}{}
\xpatchcmd{\@maketitle}{\huge}{\Huge}{}{}
\setkomafont{section}{\usefont{LY1}{YanoneKaffeesatzZeroHack}{b}{n}\huge}
\setkomafont{subsection}{\usefont{LY1}{YanoneKaffeesatzZeroHack}{l}{n}\LARGE}
% \end{macrocode}
%
% \textsf{yanonekaffeesatzzerohack} really needs a \oarg{nodefault} option...
% \begin{macrocode}
\renewcommand*{\encodingdefault}{T1}
% \end{macrocode}
%
% Droid for all the rest:
% \begin{macrocode}
\RequirePackage[default]{droidsans}
\RequirePackage[defaultmono]{droidmono}
% \end{macrocode}
%
% \Finale
\endinput
% vim: set tw=100 noet sw=2 ts=2 sts=2: