-
Notifications
You must be signed in to change notification settings - Fork 4
/
monroe-deliverable.sty
executable file
·298 lines (207 loc) · 8.62 KB
/
monroe-deliverable.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
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
%%%
%%% monroe-deliverable.sty, version 1.0 (2015-05-04)
%%% Author: David Ros ([email protected])
%%%
%%% To dos:
%%% - most macros for reading ``values'' are probably not very useful
%%% outside of this sty file, maybe remove them?
%------------------------------------------------------------%
%------------------------ Packages ------------------------%
%------------------------------------------------------------%
% for specifying document margins
%%% add showframe option to show the margins
\usepackage[a4paper, left=2cm, right=2cm, top=3cm, bottom=3cm]{geometry}
% for page headers and footers
\usepackage{fancyhdr}
\addtolength{\headheight}{\baselineskip} %%% we need this because we have 2-line headers
% for inline comments
\usepackage[table]{xcolor}
% allow use of accented characters
\usepackage[latin1]{inputenc}
% choice of font families
\usepackage{mathptmx} %%% Use Times (and Symbol) for maths, not Computer Modern
\renewcommand{\sfdefault}{phv} %%% Helvetica as sans-serif font
\renewcommand{\ttdefault}{pcr} %%% Courier as fixed-width font
\renewcommand{\rmdefault}{put} %%% Utopia font as normal font
%\renewcommand{\rmdefault}{ptm} %%% Times font
%\renewcommand{\rmdefault}{bch} %%% Charter font
\usepackage[scaled]{helvet}
\usepackage{setspace}
\onehalfspacing %%% inter-line spacing of 1.5 lines
% you can use \euro{} to get an euro symbol
\usepackage{eurosym}
% font encoding
\usepackage[T1]{fontenc}
\usepackage{textcomp}
% for math stuff
\usepackage{amsmath}
\usepackage{amssymb}
% for graphic stuff
\usepackage{graphicx}
%%% use [H] for forcing LaTeX to insert graphics HERE
\usepackage{float}
\usepackage{subfig}
%%% use \includepdf{filename} for inserting a PDF file as an annex
\usepackage{pdfpages}
% for decent-looking and/or complex tables
\usepackage{colortbl}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{array}
% for activating URLs
\usepackage[colorlinks,linkcolor=black,citecolor=blue,urlcolor=blue]{hyperref}
% for the bibliography
\usepackage[compress]{cite}
\usepackage{url}
\urlstyle{tt}
% for ensuring the right spacing is applied (or should be...) at the end of our macros
\usepackage{xspace}
% for getting the page count in footers
\usepackage{lastpage}
%------------------------------------------------------------%
%--------------------- User commands ----------------------%
%------------------------------------------------------------%
\newcommand*{\setproject}[2]{\def\@projacronym{#1}\def\@projname{#2}}
\newcommand*{\setprojectnumber}[1]{\def\@projnum{#1}}
\newcommand*{\setECcall}[1]{\def\@callnum{#1}}
\newcommand*{\setprojectlogo}[2]{\def\@pathtoprojlogo{#1}\def\@projlogoscale{#2}}
\newcommand*{\setEClogo}[2]{\def\@pathtoEClogo{#1}\def\@eclogoscale{#2}}
\newcommand*{\setworkpackage}[2]{\def\@wpnum{#1}\def\@wpname{#2}}
%\newcommand{\setdeliverable}[3]{\def\@delivnum{#1}\def\@delivname{#2}\def\@delivshortname{#3}}
\newcommand{\setdeliverable}[3][\null]{\ifx#1\null\def\@delivshortname{#3}\def\@delivnum{#2}\def\@delivname{#3}\else\def\@delivshortname{#1}\def\@delivnum{#2}\def\@delivname{#3}\fi}
\newcommand*{\setpublicdeliverable}{\def\@confidentiality{Public}\def\@shortconf{Public}}
\newcommand*{\setprivatedeliverable}{\def\@confidentiality{Confidential, only for members of the consortium \newline (including the Commission Services)}\def\@shortconf{Confidential}}
\def\@delivtypecode{R} % this is the default type
\def\@delivtype{Report} % this is the default type
\def\@delivtypedem{dem}
\def\@delivtypedec{dec}
\def\@delivtypeother{other}
\newcommand*{\setdeliverabletype}[2]{%
\def\@delivtypechoice{#1}%
\ifx\@delivtypechoice\@delivtypeother\def\@delivtypecode{OTHER}\fi%
\ifx\@delivtypechoice\@delivtypedem\def\@delivtypecode{DEM}\fi%
\ifx\@delivtypechoice\@delivtypedec\def\@delivtypecode{DEC}\fi%
\def\@delivtype{#2}
}
\newcommand*{\setrevision}[2]{\def\@revision{#1}\def\@revisiondate{#2}}
\newcommand{\setdeliverableauthors}[2][Contributor(s):]{\def\@delivauthorsstring{#1}\def\@delivauthors{#2}}
\newcommand{\setdeliverableeditors}[1]{\def\@deliveditors{#1}}
\newcommand{\deliverableabstract}[1]{\def\@abstract{#1}}
\newcommand{\deliverablekeywords}[1]{\def\@keywords{#1}}
%%% the following are for printing what was defined via the \setxxx commands,
%%% in theory with proper handling of spacing after (but xspace is not perfect...)
\newcommand{\projectacronym}{\@projacronym\xspace}
\newcommand{\projectname}{\@projname\xspace}
\newcommand{\projectnumber}{\@projnum\xspace}
\newcommand{\ECcall}{\@callnum\xspace}
\newcommand{\wpname}{\@wpname\xspace}
\newcommand{\wpnumber}{\@wpnum\xspace}
\newcommand{\deliverablename}{\@delivname\xspace}
\newcommand{\deliverableshortname}{\@delivshortname\xspace}
\newcommand{\deliverablenumber}{\@delivnum\xspace}
\newcommand{\disseminationlevel}{\@confidentiality\xspace}
\newcommand{\revisionnumber}{\@revision\xspace}
\newcommand{\revisiondate}{\@revisiondate\xspace}
\newcommand{\deliverableauthors}{\@delivauthors\xspace}
\newcommand{\deliverableeditors}{\ifx\@deliveditors\undefined{ }\else\@deliveditors\xspace\fi}
\newcommand{\deliverabletype}{\@delivtype\xspace}
\newcommand{\deliverabletypecode}{\@delivtypecode\xspace}
%------------------------------------------------------------%
%--------------- For printing the cover page --------------%
%------------------------------------------------------------%
%\renewcommand{\@maketitle}{
\newcommand{\makecoverpage}{
%\null\vspace*{\fill}
%\framebox{
%\begin{minipage}[c][22cm][s]{\textwidth}
\vspace*{1cm}
\sf
\begin{center}
\includegraphics[scale=\@projlogoscale]{\@pathtoprojlogo}
\vspace*{1cm}
\textbf{\LARGE\projectacronym}
\textbf{\large\projectname}
\vspace*{0.5cm}
{\large\ECcall}
{\large Project number: \projectnumber}
\vspace*{\fill}
{\Large Deliverable \deliverablenumber \\ \textbf{\deliverablename}}
%\vspace*{\fill}
%
%{\textbf{Editor(s):} \\ \deliverableeditors}
%
%\vspace*{1ex}
%
%{\textbf{Contributor(s):} \\ \deliverableauthors}
\end{center}
\vspace*{\fill}
\singlespacing
{
\centering
%\setlength{\tabcolsep}{0pt}
\begin{tabular*}{16cm}{@{\hspace{0pt}}p{4cm}@{\hspace{0pt}}p{12cm}}
\ifx\@deliveditors\undefined & \\ \else\textbf{Editor(s):} & \deliverableeditors \\\fi
\textbf{\@delivauthorsstring} & \deliverableauthors \\
& \\
\textbf{Work Package:} & \wpnumber~/~\wpname \\
\textbf{Revision:} & \revisionnumber \\
\textbf{Date:} & \revisiondate \\
\textbf{Deliverable type:} & \deliverabletypecode (\deliverabletype) \\
\textbf{Dissemination level:} & \disseminationlevel \\
\end{tabular*}
}
\onehalfspacing
\vspace*{0.5cm}
\begin{center}
\includegraphics[scale=\@eclogoscale]{\@pathtoEClogo}
\end{center}
\rm
%\end{minipage}
%} % end of \framebox{}
%\vspace*{\fill}
} % end of \renewcommand{\@maketitle}
%------------------------------------------------------------%
%------------ For printing a second cover page ------------%
%------------------------------------------------------------%
\newcommand{\makesecondcoverpage}{
\null\vspace*{\fill}
%\begin{center}\bf\large Abstract \normalsize\rm\end{center}
\begin{quotation}
\noindent \bf\large Abstract \normalsize\rm \\[1ex]
\noindent \@abstract
\end{quotation}
\ifx\@keywords\undefined\null
\else
\vspace*{1ex}
\begin{quotation}
\noindent \bf\large Keywords \normalsize\rm \\[1ex]
\noindent \@keywords
\end{quotation}
\fi
\vspace*{\fill}
} % \makesecondcoverpage
%------------------------------------------------------------%
%---------- For printing an (optional) back page ----------%
%------------------------------------------------------------%
\newcommand{\makebackpage}{
\null\vspace*{\fill}
%\begin{center}\bf\large Disclaimer \normalsize\rm\end{center}
\begin{quotation}
\noindent \bf\large Disclaimer \normalsize\rm \\[1ex]
\noindent The views expressed in this document are solely those of the author(s). The European Commission is not responsible for any use that may be made of the information it contains. \\[1ex]
\noindent All information in this document is provided ``as is'', and no guarantee or warranty is given that the information is fit for any particular purpose. The user thereof uses the information at its sole risk and liability.
\end{quotation}
\vspace*{\fill}
}
%------------------------------------------------------------%
%------------------ Headers and footers -------------------%
%------------------------------------------------------------%
\pagestyle{fancy}
\lhead{\small \deliverablenumber\ \\ \deliverableshortname}
\chead{}
\rhead{\small \@shortconf \\ Rev.\ \revisionnumber / \@revisiondate}
\lfoot{\includegraphics[height=4ex]{\@pathtoprojlogo}}
\cfoot{\small \thepage\ of \pageref{LastPage}}
\rfoot{\small Project no. \@projnum}
\renewcommand{\headrulewidth}{0.2pt}
\renewcommand{\footrulewidth}{0.2pt}