forked from birnstiel/erc_template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathercgrant.cls
230 lines (194 loc) · 5.65 KB
/
ercgrant.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ercgrant}[2011/03/26 My custom ERCgrant class]
\let\@firstchapter\@empty
\newif\ifisBtwo
\DeclareOption{B2}{%
\isBtwotrue
\def\@firstchapter{1}%
}
\ProcessOptions
\LoadClass{scrreprt}
%\ifx\@firstchapter\@empty \addtocounter{chapter}{1}\else\addtocounter{chapter}{\@firstchapter}\fi
\addtocounter{chapter}{1}
%%% PACKAGES %%%
\RequirePackage[english]{babel}
\RequirePackage[right]{eurosym}
\setlength{\footskip}{1.45\baselineskip}
\RequirePackage[left=2cm,top=1.5cm,bottom=1.5cm,right=2cm,includefoot,includehead]{geometry}
\RequirePackage[utf8]{inputenc}
\RequirePackage{graphicx} % Add graphics capabilities
\RequirePackage{xspace}
\RequirePackage{blindtext}
\RequirePackage{amsmath} % Better maths support
\RequirePackage{pslatex} %Times font
\RequirePackage{todonotes}
\RequirePackage{mdframed}
% for the open and filled star symbols
\RequirePackage{bbding}
\newcommand{\fstar}{\raisebox{-0.12em}{\begin{scriptsize}\FiveStar\end{scriptsize}}}
\newcommand{\ostar}{\raisebox{-0.12em}{\begin{scriptsize}\FiveStarOpen\end{scriptsize}}}
% ========= HYPERREF & Colors ===========
\RequirePackage{xcolor}
\definecolor{lightgray} {gray}{0.7}
\definecolor{darkgray} {gray}{0.43}
\definecolor{darkblue} {rgb} {0,0,.65}
\definecolor{citegreen} {rgb} {0.28,0.41,0.19}
\definecolor{darkgreen} {rgb} {0.37,0.72,0.17}
\definecolor{lightgreen}{rgb} {0.56,0.88,0.28}
\RequirePackage[%
pdfstartview=FitH,%
breaklinks=true,%
bookmarks=true,%
colorlinks=true,%
linkcolor= darkblue,
anchorcolor=black,%
citecolor=citegreen,
filecolor=black,%
menucolor=black,%
urlcolor=darkblue%
]{hyperref}
\AtBeginDocument{%
\hypersetup{%
pdfauthor={\@author},%
pdftitle={ERC proposal - \@title}%
}
}
% ========== BIBLIOGRAPHY STUFF ============
\RequirePackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}
\input{abbrev.tex}
\setlength{\bibsep}{0.0cm}
% ========== SECTION FORMATTING ============
\RequirePackage{titlesec}
\renewcommand\thesection{\alph{section}}
%###
\titleformat{\section}{\Large\bfseries}{Section \thesection: }{0em}{}
%###
%###
% have the chapter on the same page
\titleclass{\chapter}{straight}
% calling the chapters B1, B2, \ldots
\renewcommand{\thechapter}{B\arabic{chapter}}
\titleformat{\chapter}{\Large\bfseries}{Part \thechapter: }{0em}{}
%###
%
% save space between section headings, and after figures
%
%###
\titlespacing*{\chapter} {0pt}{1.5ex}{1ex}
\titlespacing*{\section} {0pt}{1.5ex}{1ex}
\titlespacing*{\subsection} {0pt}{1.5ex}{0.8ex}
\titlespacing*{\subsubsection}{0pt}{1.5ex}{0.8ex}
\titlespacing*{\paragraph} {0pt}{1.0ex}{0.8ex}
\setlength{\belowcaptionskip}{-0.5cm}
%###
% === FIGURE AND CAPTION STUFF ====
\RequirePackage[font=small]{caption}
\RequirePackage{chngcntr}
% don't show the chapter part in the caption
%\counterwithout{figure}{chapter}
%\counterwithout{table}{chapter}
% for ``side-figures''
\RequirePackage{wrapfig}
% ==== TABLE STUFF ===========
\RequirePackage{makecell}
\RequirePackage{longtable}
\RequirePackage{multirow}
\RequirePackage{colortbl}
\definecolor{kugray5}{RGB}{224,224,224}
\newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
% to hide a table column
\RequirePackage{array}
\newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{B}[1]{>{\columncolor{lightgreen}\bf\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
% align digits in tables
\RequirePackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
% change font size of captions
\RequirePackage[font=small]{caption}
% ======== To fix list things ============
\RequirePackage{enumitem}
\setitemize{noitemsep,topsep=0ex,parsep=0.25ex,partopsep=0pt,leftmargin=*}
\setenumerate{topsep=0pt,parsep=0pt,partopsep=0pt,leftmargin=*}
\RequirePackage{amssymb}
\renewcommand{\labelitemi}{\tiny$\blacksquare$}
\RequirePackage{nopageno}
\RequirePackage{enumitem}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt} % Remove line at top
\lhead{\emph{\@author}}
\chead{Part \thechapter}
\rhead{\theacro}
\cfoot{\thepage}
\newenvironment{itemize*}%
{\begin{itemize}%
\setlength{\itemsep}{0pt}%
\setlength{\parskip}{0pt}}%
{\end{itemize}}
% ============== SOME MACROS ===============
\newcommand{\cont}{\textcolor{red}{\textbf{continue}}\xspace}
\newcommand{\comment}[1]{\textcolor{red}{\textbf{#1}}\xspace}
\newcommand{\x}{\textcolor{red}{XXX}\xspace}
\let\@acro\empty
\newcommand{\acro}[1]{\def\@acro{#1}}
\newcommand{\theacro}{\textsc{\@acro}\xspace}
\newcommand{\proposal@duration}{60 Months}
\let\@institution\empty
\newcommand{\institution}[1]{\def\@institution{#1}}
% ========= DEFINE TITLE, AUTHOR, DATE =========
\title{\@acro}
% ========= Format title page =========
\ifisBtwo
\renewcommand{\maketitle}{%
\begin{center}
\LARGE{\textbf{ERC Starting Grant 2016\\
Research proposal [Part B2] }
}
\end{center}
\vspace{1cm}
}
\else
\renewcommand{\maketitle}{%
\begin{center}
\makeatletter
\LARGE{\textbf{ERC Starting Grant 2016\\
Research proposal [Part B1] }
}
\vfill
%
\LARGE{\textsc{\@title}}
%
\vfill
%
\LARGE{\textsc{---~\@acro~---}}
%
\vfill
\makeatother
\end{center}
%
\vfill
%
\begin{itemize}
\makeatletter
\item Principal investigator (PI): \@author
\item Host institution: \@institution
\item Proposal full title: \@title
\item Proposal short name: \@acro
\item Proposal duration: \proposal@duration
\makeatother
\end{itemize}
\vfill
}
\fi
\renewenvironment{abstract}{%
\begin{mdframed}
}{%
\end{mdframed}
\vfill
\newpage
}