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
|
\NeedsTeXFormat{LaTeX2e}%
\newcommand{\ClassToLoad}{report}
\ProvidesClass{pms}
% Accept all options given through the loading tex file
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{\ClassToLoad}
}
\PassOptionsToClass{a4paper}{\ClassToLoad}
% Let the base class process all give options, either from this class
% or user defined from an outside tex file.
\ProcessOptions\relax
\LoadClass{\ClassToLoad}
\PassOptionsToPackage{T1}{fontenc}
\PassOptionsToPackage{orig,english}{isodate}
% Position caption of float environments at the top
\PassOptionsToPackage{position=top}{caption}
% Enable UTF-8 input encoding
\PassOptionsToPackage{utf8}{inputenc}
% algorithmic and algorithm to be loaded last to avoid failures
\RequirePackage{%
fontenc, % Load extended font sets
isodate, % Date formatting and conversions
typearea, % Set page layout
inputenc, % Allow input methods apart from ASCII
booktabs, % Nicer formatting of tables
color, % Support more than black&white
ifthen, % Comfortable conditional routines
longtable, % Extend tables over more than one page
array, % Extended tabular environments
lscape, % Rotating pages
marginnote, % Typeset a paragraph in the page margin
paralist, % Additional list environments
parskip, % Space between paragraphs instead of indentation
verbatim % Extend the print-as-is functionality
}
% tex4ht workaround: hyperref needs to be loaded /after/ tex4ht injects itself
\g@addto@macro\@documentclasshook{
\RequirePackage{
caption, % Extended float environment formatting
float, % More control over float environments
hyperref, % Support for hyperlinks
algorithm, %
algorithmic % Set algorithms
}
}
\ClassInfo{pms}{Capsulation of LaTeX stuff for the Package Manager
Specification, loaded baseclass: \ClassToLoad\MessageBreak}
% Contains information over the source control system, generated
% through Makefile
\input{vc}
% Make processing with TeX4HT possible
\newboolean{TEX4HT-HACKS}
\ifx\HCode\undefined
\RequirePackage{%
mathptmx,
courier,
pdfpages % Insert whole PDF documents as separate pages
}
\RequirePackage[scaled=.90]{helvet}
\setboolean{TEX4HT-HACKS}{false}
\else
\setboolean{TEX4HT-HACKS}{true}
\fi
% tex4ht workaround: these need to happen after loading the float package
\g@addto@macro\@documentclasshook{
\floatstyle{plaintop}
\newfloat{listing}{tbp}{lol}[chapter]
\floatname{listing}{Listing}
}
\newcommand{\listoflistings}{\listof{listing}{Listings}}
% Define own label and reference commands, that display the label in
% the page margin.
\newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}}
\newcommand{\compactfeatureref}[1]{#1~p\pageref{feat:#1}}
\newcommand{\featurelabel}[1]{\marginnote{%
\framebox{\textsc{#1}}}\label{feat:#1}
}
\bibliographystyle{plainurl}
% Enumerate subsubsections, but don't include them in the toc.
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
% Some shorthands for the lazy ones.
% tex4ht workaround: this needs to happen after loading hyperref
\g@addto@macro\@documentclasshook{
\renewcommand{\b}[1]{\textbf{#1}}
\renewcommand{\i}[1]{\textit{#1}}
\renewcommand{\t}[1]{\texttt{#1}}
}
\newcommand{\e}[1]{\emph{#1}}
\newcommand{\note}[1]{\paragraph{Note:} #1}
% Because we are lazy, we define a table environment to fulfil our needs
\newenvironment{centertable}[1]%
{
\begin{table}
\ifx\mycolour\undefined\else\mycolour\fi
\centering
\caption{#1}
}{
\end{table}
}
% Define some PDF meta-data.
% tex4ht workaround: this needs to happen after loading hyperref
\g@addto@macro\@documentclasshook{
\hypersetup{%
urlcolor=black,
colorlinks=true,
citecolor=black,
linkcolor=black,
pdflang={en},
pdfcreator={pdfLaTeX and hyperref},
pdfproducer={pdfLaTeX and hyperref},
}
}
% Reads the last commit date from the Git repository and even succeeds
% when none is available
\ifthenelse{\equal{\VCDateISO}{}}
{
\date{Generated on: \today}
}{
\date{\printdate{\VCDateISO}}
}
% Set page title
\pagestyle{headings}
% This is some kind of hack. We set the proportions of the text area
% and then move it 30mm to the left to increase the right (outer)
% margin.
\areaset[-30mm]{400pt}{700pt}
% To find everywhere that needs updating when we add an EAPI
\newcommand{\CurrentEAPIIs}[1]{\def\TheCurrentEAPI{#1}}
\newcommand{\ChangeWhenAddingAnEAPI}[1]{\ifthenelse{\equal{\TheCurrentEAPI}{#1}}{}{\errmessage{This
needs to be updated for EAPI \TheCurrentEAPI}}}
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "pms"
%%% LaTeX-indent-level: 4
%%% LaTeX-item-indent: 0
%%% TeX-brace-indent-level: 4
%%% End:
|