-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdp_doc.sty
166 lines (133 loc) · 4.72 KB
/
sdp_doc.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
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sdp_doc}
\RequirePackage[usenames]{color} % for fancy colours
\RequirePackage{fancyhdr} % for the custom-defined headers
\RequirePackage{lastpage} % to display the total nr. of pages in the footer
\RequirePackage{graphicx} % for the figures
\RequirePackage{mdwlist} % for the list of abbreviations
\RequirePackage{url} % for the correct hyphening of URLs
\RequirePackage{natbib} % bibliography
\RequirePackage{eurosym} % \euro symbol
\RequirePackage{xspace} % front matter definitions
\RequirePackage{a4} % proper margins for a4 paper
\RequirePackage[small,labelfont=bf,margin=0.5cm]{caption}
\RequirePackage{tabularx}
% create a variable \@sdpsans and initialize it to empty
\def\@sdpsans{}
% create an option to select sans-serif fonts for the body
% all this does is set the variable to true, for later testing
\DeclareOption{sans}{%
\def\@sdpsans{true}%
}
% catch invalid options
\DeclareOption*{%
\PackageWarning{sdp_doc}{Unknown option `\CurrentOption'}%
}
% execute the code in the options
% this should only set the \@sdpsans flag, if the option was selected.
\ProcessOptions\relax
% sans/serif font-based code goes here
\ifx \@sdpsans \@empty
% helvetica is the closest we can get to Arial
\typeout{SDP document style: loading helvet package}
\RequirePackage{helvet}%
\renewcommand{\familydefault}{\sfdefault}%
\else
\typeout{SDP document style: loading times package}
\RequirePackage{times}
\fi
\definecolor{SDPgrey}{rgb}{0.3098,0.3373,0.3137}
\definecolor{SDPdarkblue}{rgb}{0,0.3333,0.5059}
% dark blue: RGB 000/085/129, CMYK 100/49/12/58; uncoated: CMYK 100/43/12/56
% grey: RGB 079/086/080, CMYK 54/27/36/82; uncoated: CMYK 52/32/30/76
% Re-define the section commands to use the required font sizes
\renewcommand\section{%
\@startsection{section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\sffamily\fontsize{14}{17}\bfseries}}
\renewcommand\subsection{%
\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\sffamily\fontsize{13}{14}\selectfont\bfseries}}
\renewcommand\subsubsection{%
\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
{\sffamily\large\bfseries}}
% set up page size parameters for A4 paper
\addtolength{\topmargin}{-2cm}
\addtolength{\textheight}{1cm}
\addtolength{\footskip}{0.5cm}
%\addtolength{\oddsidemargin}{-1cm}
%\addtolength{\evensidemargin}{-1cm}
%\addtolength{\textwidth}{2.5cm}
% define fixed margins. Latex counts from a 1" default margin
% so e.g., for 14 mm you need to set 14-25.4 = -11.4 mm
\setlength{\oddsidemargin}{2mm}
\setlength{\evensidemargin}{2mm}
\setlength{\textwidth}{158mm}
% page style
\pagestyle{fancy}
% bibliography style
\bibliographystyle{egu} % this will give the references in author,
% year format with round parantheses
% Define the header and the footer
\lhead{}
\chead{}
\rhead{}
\lfoot{\footnotesize Document No: \docnr\\Revision: \revision\\Release Date: \docudate}
\cfoot{}
\rfoot{\footnotesize\classification\\Author: \leadauthor\\Page~\thepage\ of \pageref{LastPage}}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand\textbox[1]{%
\parbox{.333\textwidth}{#1}%
}
% macros for a title front page and a status page
\newcommand{\sdpfrontpage}{\input{sdp_frontpage}}
% command to add a table of contents
\newcommand{\sdptableofcontents}{%
\newpage %
% Re-define the title of the ToC
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents %
}
% command to include a list of figures
\newcommand{\sdplistoffigures}{%
\newpage%
\listoffigures%
\addcontentsline{toc}{section}{List of figures}%
}
% command to include a list of tables
\newcommand{\sdplistoftables}{%
\newpage%
\listoftables%
\addcontentsline{toc}{section}{List of tables}%
}
% command to include a list of abbreviations (page layout, fill in yourself)
\newcommand{\sdplistofabbreviations}{%
\newpage%
\section*{List of abbreviations}
\addcontentsline{toc}{section}{List of abbreviations}%
}
% command to include a list of abbreviations (page layout, fill in yourself)
\newcommand{\sdplistofsymbols}{%
\newpage%
\section*{List of symbols}
\addcontentsline{toc}{section}{List of symbols}%
}
% command to include a summary (fill in yourself)
\newcommand{\sdpsummary}{%
\newpage%
\section*{Summary}
\addcontentsline{toc}{section}{Summary}%
}
% command to include reference documents (fill in yourself)
\newcommand{\sdpreferencedocs}{%
\newpage%
\section*{Applicable and reference documents}
\addcontentsline{toc}{section}{Applicable and reference documents}%
}
\endinput