-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdhbenelux.sty
175 lines (170 loc) · 5.73 KB
/
dhbenelux.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
% Copyright (C) 2016 by Martin Sievers
% --------------------------------------------------------------------
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License (LPPL), either
% version 1.3c of this license or (at your option) any later
% version. The latest version of this license is in the file:
%
% http://www.latex-project.org/lppl.txt
%
% This work is "maintained" (as per LPPL maintenance status) by
% Martin Sievers <[email protected]>.
%
% This work consists of the files dhbenelux.sty and abstract-template.tex
%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dhbenelux}[2016/04/20 v0.3 A small style file for the DH Benelux]
\RequirePackage{ifxetex}
\RequireXeTeX
\newif\if@print
\newif\if@usebiblatex
\DeclareOption{electronic}{\@printfalse}
\DeclareOption{print}{\@printtrue}
\DeclareOption{biblatex}{\@usebiblatextrue}
\DeclareOption{nobiblatex}{\@usebiblatexfalse}
\ExecuteOptions{biblatex,electronic}
\ProcessOptions\relax
\usepackage{fontspec}
\setmainfont{Calibri}
\usepackage[british]{babel}
\usepackage{microtype}
\usepackage{parskip}
\setlength{\parskip}{10pt}
\usepackage[margin=2.54truecm]{geometry}
\usepackage{setspace}
\setstretch{1.15}
\usepackage{xcolor}
\definecolor{BlauAkzent1}{RGB}{79,129,189}
\definecolor{RedForTitle}{RGB}{153,0,0}
\definecolor{GrayForReferences}{RGB}{102,102,102}
\usepackage{caption}
\captionsetup{%
labelfont={color=BlauAkzent1},%
textfont={color=BlauAkzent1},%
font=footnotesize,%
format=hang,justification=raggedright,%
singlelinecheck=false}
\usepackage[autostyle]{csquotes}
\if@usebiblatex
\PackageInfo{dhbenelux}{Package biblatex loaded. Please use\MessageBreak biber instead of bibtex to connect your .bib file.}
\usepackage[backend=biber,style=authoryear]{biblatex}
%%%
\ExecuteBibliographyOptions{firstinits=true,uniquename=init,doi=false,isbn=false}
%
\DeclareNameAlias{sortname}{last-first}
%
\setlength{\bibitemsep}{0pt}
\setlength{\bibhang}{2em}
\renewcommand{\newunitpunct}{\addcomma\space}
\renewcommand{\labelnamepunct}{\addspace}
\renewbibmacro*{in:}{}
\renewcommand{\bibfont}{\normalfont\fontsize{10pt}{11.5pt}\selectfont\raggedright}
\defbibheading{bibliography}[\refname]{%
\removelastskip%
\vspace*{8mm}%
{\bfseries\fontsize{12pt}{13.8pt}\selectfont\color{GrayForReferences} #1\par}%
\vspace*{-0.5\baselineskip}}%
\else
\PackageInfo{dhbenelux}{You deactivated biblatex. Please provide your\MessageBreak own bibliography or use BiBTeX instead.}
\newcommand*{\addbibresource}{\PackageError{dhbenelux}{You can not use \string\addbibresource, because\MessageBreak you deactivated biblatex.}{Please remove the option ``nobiblatex'' from the \string\usepackage\space call}}
\newcommand*{\addbibresource}{\PackageError{dhbenelux}{You can not use \string\printbibliography, because\MessageBreak you deactivated biblatex.}{Please remove the option ``nobiblatex'' from the \string\usepackage\space call}}
\RequirePackage{url}
\fi%
\urlstyle{same}
\usepackage{multicol}
\usepackage[colorlinks,pdfusetitle]{hyperref}
\if@print\hypersetup{allcolors=black}\fi%
\newcounter{authors}
\renewcommand{\theauthors}{\roman{authors}}
\makeatletter
\def\@authori{}
\def\@authorii{}
\def\@authoriii{}
\def\@authoriv{}
\def\@authorv{}
\def\@authorvi{}
\def\@authorvii{}
\def\@authorviii{}
\def\@authorix{}
\def\@authorx{}
\def\author#1#2#3{%
\stepcounter{authors}
\expandafter\def\csname @author\theauthors\endcsname{#1}
\expandafter\def\csname @affil\theauthors\endcsname{#2}
\expandafter\def\csname @email\theauthors\endcsname{#3}
}
\newcounter{@titlemulticols}
\def\maketitle{%
\begin{center}
{\fontsize{24pt}{24pt}\selectfont\bfseries\color{RedForTitle}\@title\par\vspace*{0.35cm}}
\ifx\@authorvii\@empty% at most 6 authors
\ifx\@authoriv\@empty% at most 3 authors
\setcounter{@titlemulticols}{1}%
\else
\setcounter{@titlemulticols}{2}%
\fi%
\else
\setcounter{@titlemulticols}{3}%
\fi%
\ifnum\value{@titlemulticols}>1
\begin{multicols}{\the@titlemulticols}
\fi%
\ifx\@authori\empty
\relax
\else
\textit{\large\@authori}\\*\@affili\\*\@emaili\par
\fi
\ifx\@authorii\empty
\relax
\else
\textit{\large\@authorii}\\*\@affilii\\*\@emailii\par
\fi
\ifx\@authoriii\empty
\relax
\else
\textit{\large\@authoriii}\\*\@affiliii\\*\@emailiii\par
\fi
\ifx\@authoriv\empty
\relax
\else
\textit{\large\@authoriv}\\*\@affiliv\\*\@emailiv\par
\fi
\ifx\@authorv\empty
\relax
\else
\textit{\large\@authorv}\\*\@affilv\\*\@emailv\par
\fi
\ifx\@authorvi\empty
\relax
\else
\textit{\large\@authorvi}\\*\@affilvi\\*\@emailvi\par
\fi
\ifx\@authorvii\empty
\relax
\else
\textit{\large\@authorvii}\\*\@affilvii\\*\@emailvii\par
\fi
\ifx\@authorviii\empty
\relax
\else
\textit{\large\@authorviii}\\*\@affilviii\\*\@emailviii\par
\fi
\ifx\@authorix\empty
\relax
\else
\textit{\large\@authorix}\\*\@affilix\\*\@emailix\par
\fi
\ifx\@authorx\empty
\relax
\else
\textit{\large\@authorx}\\\@affilx\\\@emailx\par
\fi
\ifnum\value{@titlemulticols}>1
\end{multicols}
\fi%
\end{center}
\vspace*{2\baselineskip}
}
\def\fps@figure{htb}
\makeatother