-
Notifications
You must be signed in to change notification settings - Fork 0
/
erc-stg.cls
400 lines (312 loc) · 10 KB
/
erc-stg.cls
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
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
% <<< preamble
\def\fileversion{v1.0}
\def\filedate{2024/07/20}
\def\clsname{erc-stg}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{\clsname}[\filedate\ \fileversion\ ERC Starting Grant Proposal]
% >>>
% <<< declare options
% part B1 and B2
\newif\if@partone \@partonefalse
\DeclareOption{partone}{\@partonetrue}
\newif\if@parttwo \@parttwofalse
\DeclareOption{parttwo}{\@parttwotrue}
% use Times New Roman
\newif\if@timesnewroman \@timesnewromanfalse
\DeclareOption{timesnewroman}{\@timesnewromantrue}
% use Arial
\newif\if@arial \@arialfalse
\DeclareOption{arial}{\@arialtrue}
% draft features
\newif\if@draftproposal \@draftproposalfalse
\DeclareOption{draftproposal}{\@draftproposaltrue}
% documentation features
\newif\if@nocomments \@nocommentsfalse
\DeclareOption{nocomments}{\@nocommentstrue}
% grid
\newif\if@layoutgrid \@layoutgridfalse
\DeclareOption{layoutgrid}{\@layoutgridtrue}
% additional options passed to `scrartcl` class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
\PassOptionsToClass{a4paper, fontsize=11bp}{scrartcl}
\ProcessOptions
\LoadClass{scrartcl}
% >>>
% <<< required packages
% NOTE: load packages after the class was loaded since they may depend on it
\RequirePackage{iftex}
\RequirePackage{xparse}
\RequirePackage{geometry}
\RequirePackage[hypertexnames=false,breaklinks=true]{hyperref}
% build fancy table required for organization description
\RequirePackage{array}
\RequirePackage[table]{xcolor}
\RequirePackage{longtable}
% customize headers and footers
\RequirePackage{scrlayer-scrpage}
% indent first paragraph in a section
\RequirePackage{indentfirst}
% set recommended spacing
\RequirePackage{setspace}
% enable comments
\RequirePackage{comment}
% for everbody's benefit
\RequirePackage[shortlabels]{enumitem}
% >>>
% <<< commands
\NewDocumentCommand \ercyear {} {\advance\year by 1 \the\year\advance\year by -1}
% NOTE: color used for comments
\definecolor{ERCGray}{RGB}{140, 140, 140}
% NOTE: color used for table headers
\definecolor{ERCTableGray}{RGB}{191, 191, 191}
\NewDocumentCommand \ercauthor { m } {\def\@ercauthor{#1}}
\NewDocumentCommand \ercauthorlastname { m } {\def\@ercauthorlastname{#1}}
\NewDocumentCommand \ercinstitution { m } {\def\@ercinstitution{#1}}
\NewDocumentCommand \ercduration { m } {\def\@ercduration{#1}}
\NewDocumentCommand \erctitle { m } {\def\@erctitle{#1}}
\NewDocumentCommand \ercacronym { m } {\def\@ercacronym{#1}}
\NewDocumentCommand \ercsummary { m } {\def\@ercsummary{#1}}
\NewDocumentCommand \ercnocrosssummary { } {\def\@erccrosssummaryempty}
\NewDocumentCommand \erccrosssummary { m } {\def\@erccrosssummary{#1}}
\def\@ercauthor{Applicant Name}
\def\@ercauthorlastname{Applicant's last name}
\def\@ercinstitution{Institution Name}
\def\@ercduration{XX}
\def\@erctitle{Proposal Full Title}
% \def\@ercacronym{ACRONYM}
% enable comments only in draft mode
\if@draftproposal\else
\@nocommentstrue
\fi
% define comment environments
\if@nocomments
\excludecomment{erccomment}
\NewDocumentCommand \erchidden { m } {\empty}
\else
\NewDocumentCommand \erchidden { m } {\textcolor{ERCGray}{#1}}
\newenvironment{erccomment}{%
\vspace{-0.5cm}
\setlength{\parskip}{1em}%
\color{ERCGray}}{}
\fi
\if@nocomments
\def\@ercsummary{\hfill \vspace{10.5cm}}
\else
\def\@ercsummary{
\erchidden{Proposal summary (identical to the abstract from the online proposal
submission forms, section 1). \\}
\erchidden{The abstract (summary) should, at a glance, provide the reader with
a clear understanding of the objectives of the research proposal and how they will
be achieved. The abstract will be used as the short description of your research
proposal in the evaluation process and in communications to contact in particular
potential independent external experts and/or to inform the Commission and/or
the programme management committees and/or relevant national funding agencies.
It must therefore be short and precise and should not contain confidential information. \\}
\erchidden{Please use plain typed text, avoiding formulae and other special
characters. The abstract must be written in English. There is a limit of 2000
characters (spaces and line breaks included). \\}
\vspace{3.3cm}
}
\def\@erccrosssummary{
\erchidden{
Explain and justify the cross-panel or cross domain nature of your proposal,
if a secondary panel is indicated in the online proposal submission forms. There is
a limit of 1000 characters (spaces and line breaks included).
}
\vspace{2cm}
}
\fi
% >>>
% <<< required formatting
\singlespacing
\ifpdftex
\RequirePackage[T1]{fontenc}
\else
\RequirePackage{fontspec}
\fi
% required font is Times New Roman (or Nimbus Roman on Linux)
\if@timesnewroman
\ifpdftex
\RequirePackage{mathptmx}
\else
\IfFontExistsTF{Times New Roman}{
\setmainfont[Ligatures=Rare]{Times New Roman}}{
\IfFontExistsTF{Nimbus Roman}{
\setmainfont{Nimbus Roman}
}{\PackageWarning{erc-stg}{No Times New Roman-type font could be found}}}
\fi
% force serif fonts
\addtokomafont{disposition}{\rmfamily}
\fi
\if@arial
\ifpdftex
\RequirePackage{helvet}
% force sans serif fonts
\renewcommand{\familydefault}{\sfdefault}
\else
\IfFontExistsTF{Arial}{
\setmainfont{Arial}}{
\IfFontExistsTF{Nimbus Sans}{
\setmainfont{Nimbus Sans}
}{\PackageWarning{erc-stg}{No Arial-type font could be found}}}
\setmainfont{Arial}
\fi
\fi
\typearea{14}
\AfterCalculatingTypearea{
\geometry{top=1.75cm, bottom=1.5cm, left=2cm, right=2cm, footskip=0.5cm, headsep=0.5cm}
}
% tighted sections a bit for more space
\RedeclareSectionCommand[beforeskip=1em, afterskip=1em]{section}
\RedeclareSectionCommand[beforeskip=1em, afterskip=1em]{subsection}
\RedeclareSectionCommand[beforeskip=1em, afterskip=1em, indent=1cm]{subsubsection}
\addtokomafont{section}{\normalsize}
\addtokomafont{subsection}{\normalsize\underline}
\addtokomafont{subsubsection}{\normalsize}
\renewcommand{\thesection}{Section \Alph{section}}
% >>>
% <<< extra formatting
% enable this to better check sizing
\if@layoutgrid
\RequirePackage[
grid, gridBG,
gridunit=mm,
gridcolor=ERCTableGray,
subgridcolor=ERCTableGray,
texcoord]{eso-pic}
\geometry{showframe=true}
\fi
\AtBeginDocument{
% customize PDF bookmarks a bit
\RequirePackage{bookmark}
\bookmarksetup{numbered}
}
% make links a bit less intrusive
\hypersetup{
colorlinks=true,
urlcolor=blue,
citecolor=black,
linkcolor=black
}
% add a timestamp in draft mode
\if@draftproposal
\newcount\timehh\newcount\timemm
\timehh=\time \divide\timehh by 60
\timemm=\time \count255=\timehh \multiply\count255 by -60
\advance\timemm by \count255
\def\draftheader{\textit{[Draft of \today]}}
\else
\def\draftheader{\empty}
\fi
% add line numbers if in draft mode
\if@draftproposal
\RequirePackage[mathlines]{lineno}
\RequirePackage{xcolor}
\renewcommand{\linenumberfont}{
\normalfont\footnotesize\textcolor{ERCGray}
}
\fi
% >>>
% <<< page header/footer styles
\pagestyle{plain}
\clearpairofpagestyles
\def\callapplicant{\@ercauthorlastname}
\def\callacronym{\textnormal{\@ifundefined{@ercacronym}{ACRONYM}{\@ercacronym}}}
\def\pagefooter{\textnormal{\thepage}}
\if@parttwo
\def\callpart{\textnormal{Part B2 \draftheader}}
\else
\def\callpart{\textnormal{Part B1 \draftheader}}
\fi
\cfoot[\pagefooter]{\pagefooter}
\ihead[\callapplicant]{\callapplicant}
\chead[\callpart]{\callpart}
\ohead[\callacronym]{\callacronym}
% >>>
% <<< title
\if@partone
\renewcommand{\maketitle}{
\vspace*{0.9cm}
\begin{center}
\textbf{\large ERC Starting Grant \ercyear}
\textbf{\Large Research proposal [Part B1]\footnotemark}
\footnotetext{Instructions for completing Part B1 can be found in the
''\textit{Information for Applicants to the Starting and Consolidator Grant
\ercyear\ Calls}``.
}
\erchidden{
\large
\textbf{\textit{
(Part B1 is evaluated in Step 1 and Step 2, \\
Part B2 is evaluated in Step 2 only)}}
}
\vspace{0.3cm}
{\huge \@erctitle}
\vspace{0.3cm}
{\huge \@ifundefined{@ercacronym}{PROPOSAL ACRONYM}{\@ercacronym}}
\end{center}
\bigskip
\noindent \textbf{Cover Page:}
\begin{itemize}[leftmargin=15pt, topsep=0pt, itemsep=0pt]
\item[--] Name of the Principal Investigator (PI): \textit{\@ercauthor}
\item[--] Name of the PI's Host Institution for the project: \textit{\@ercinstitution}
\item[--] Proposal duration in months: \textit{\@ercduration{} months} \\
\end{itemize}
\erchidden{Please delete all text highlighted in gray in this template. \\}
\noindent\fbox{\parbox{0.987\textwidth}{\@ercsummary}}
\@ifundefined{@erccrosssummaryempty}{
\noindent\fbox{\parbox{0.987\textwidth}{\@erccrosssummary}}}{}
\newpage
\if@draftproposal
\linenumbers
\fi
}
\fi
\if@parttwo
\renewcommand{\maketitle}{
\vspace*{0.65cm}
\begin{center}
\textbf{\Large ERC Starting Grant \ercyear}
\textbf{\Large Part B2\footnotemark}
\textbf{\Large \textit{(\underline{not} evaluated in Step 1)}}
\end{center}
\footnotetext{Instructions for completing Part B2 can be found in the
''\textit{Information for Applicants to the Starting and Consolidator Grant
\ercyear\ Calls}``.
}
\if@draftproposal
\linenumbers
\fi
}
\fi
% >>>
% <<< table
\newenvironment{erctable}[2][\normalsize]{
\begin{center}
#1 % Set the right size (and font maybe)
\newcommand{\ra}{\raggedright\arraybackslash}
\begin{tabular}{#2}
}{%
\end{tabular}
\end{center}
}
\newenvironment{erclongtable}[2][\normalsize]{
\begin{center}
#1 % Set the right size (and font maybe)
\newcommand{\ra}{\raggedright\arraybackslash}
\begin{longtable}{#2}
}{%
\end{longtable}
\end{center}
}
\newenvironment{erccvitem}{
\noindent
\begin{tabular}{>{\centering}m{0.15\textwidth}m{0.85\textwidth}}
}{
\end{tabular}
}
% >>>
% <<< cv
% >>>
\recalctypearea
\endinput