-
Notifications
You must be signed in to change notification settings - Fork 3
/
DWP.latex
443 lines (417 loc) · 15 KB
/
DWP.latex
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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
\documentclass[%
fontsize=12,% Größe der Grundschrift
papersize=a4,%
halfparskip,% halbe Zeile Absatzabstand statt einzug
headings=normal,% Überschriften normalgroß
titlepage=true,% eigene Seite für Titel
$if(lang)$$babel-lang$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]%
{scrartcl}
% ----------------------------- Ein paar Pakete, die wir später brauchen.
% ----------------------------- Achtung: Läuft nur mit LuaLaTeX!
\usepackage{amssymb,amsmath}
\usepackage{mathpazo}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\usepackage{fontspec}
\usepackage{calc}
\defaultfontfeatures{Scale=MatchLowercase}
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
$endfor$
$if(euro)$
\newcommand{\euro}{€}
$endif$
$if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
$else$
\setmonofont{Iosevka}[StylisticSet=8]
$endif$
$if(CJKmainfont)$
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$endif$
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
% ---------------------- hyperref für PDF-Metadaten und Linkgestaltung
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
$endif$
\usepackage{xcolor}
\definecolor{dwp-darkblue}{RGB}{0,69,134}
\usepackage{hyperref}
\hypersetup{unicode=true,
$if(title-meta)$
pdftitle={$title-meta$},
$endif$
$if(author-meta)$
pdfauthor={$author-meta$},
$endif$
pdfkeywords={$for(keywords-de)$$keywords-de$$sep$; $endfor$; $for(keywords-en)$$keywords-en$$sep$; $endfor$},
colorlinks=true,
urlcolor=dwp-darkblue,
$if(colorlinks)$
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
$else$
linkcolor=black,
citecolor=black,
$endif$
breaklinks=true}
\makeatletter
\def\url@bluestyle{\color{dwp-darkblue}}
\makeatother
\urlstyle{same} % don't use monospace font for urls
%----------- Zentrale Schriftdefinitionen
\setsansfont{WeblySleek UI Semilight}[
Ligatures=TeX,
BoldFont = {WeblySleek UI Semibold},
ItalicFont = {WeblySleek UI Semilight Italic},
BoldItalicFont = {WeblySleek UI Semibold Italic}
]
%\setmainfont{WeblySleek UI Semilight}
\renewcommand{\familydefault}{\sfdefault}
\addtokomafont{disposition}{\color{dwp-darkblue}}
\addtokomafont{subsection}{\itshape}
\addtokomafont{subsubsection}{\bfseries}
\addtokomafont{caption}{\itshape\footnotesize}
\addtokomafont{captionlabel}{\itshape}
\addtokomafont{date}{\footnotesize}
\addtokomafont{subtitle}{\Large}
\usepackage[autostyle=try]{csquotes} % Anführungszeichen
%------------ Helper to check font size:
\makeatletter
\newcommand\thefontsize{Font size: \f@size pt}
\makeatother
%------------ Sprachdefinitionen etc. Möglichst so lassen.
$if(lang)$
\usepackage[bidi=default]{babel}
$if(babel-lang)$
\babelprovide[main,import]{$babel-lang$}
$endif$
$for(babel-otherlangs)$
\babelprovide[import]{$babel-otherlangs$}
$endfor$
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
$endif$
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex}
$if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
$endif$
$if(csl-refs)$
% definitions for citeproc citations
\NewDocumentCommand\citeproctext{}{}
\NewDocumentCommand\citeproc{mm}{%
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup}
\makeatletter
% allow citations to break across lines
\let\@cite@ofmt\@firstofone
% avoid brackets around text for \cite:
\def\@biblabel#1{}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\makeatother
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
{\begin{list}{}{%
\setlength{\itemindent}{0pt}
\setlength{\leftmargin}{0pt}
\setlength{\parsep}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}}
{\end{list}}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
%------------- Programmausschnitte. Noch testen.
$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
%------------- Syntaxhighlighting basierend auf Schema 'Tango'
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{248,248,248}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{{#1}}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{{#1}}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{{#1}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{{#1}}}
\newcommand{\ImportTok}[1]{{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{{#1}}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{{#1}}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{{#1}}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{{#1}}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{{#1}}}}
\newcommand{\BuiltInTok}[1]{{#1}}
\newcommand{\ExtensionTok}[1]{{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{{#1}}}
\newcommand{\RegionMarkerTok}[1]{{#1}}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{{#1}}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{{#1}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{{#1}}}}
\newcommand{\NormalTok}[1]{{#1}}
%---
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(tables)$
\usepackage{longtable,booktabs,array}
\renewcommand{\arraystretch}{1.5}
$endif$
%--------------- Floats wie Bilder und Tabellen
\usepackage{float}
\floatplacement{figure}{htbp}
\floatplacement{table}{htbp}
\newcommand{\floatappendix}{%
\renewcommand{\bottomfraction}{0.85}
\renewcommand{\textfraction}{0.05}}
%--------------- Bilder. Als PDF oder PNG oder zur not JPEG (für Fotos etc.)
% die maximale Breite ist die Seitenbreite.
% PNGs und JPEGs sollten möglichst 300dpi als Auflösungsmetadaten tragen
% mogrify -density 300 foo.png
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\providecommand{\todo}[1]{\textbf{\textcolor{red}{TODO:~#1}}}
%---------------- Linkgestaltung TODO
% Make links footnotes _and_ hotlinks:
\usepackage{soul}
\let\orighref\href
\let\origfootnote\footnote
\newcommand\visiblehref[2]{\orighref{#1}{\color{dwp-darkblue}\setulcolor{dwp-darkblue}\ul{#2}}}
\newcommand\footnotehref[2]{\visiblehref{#1}{#2}\origfootnote{\url{#1}}}
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{}
% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
$if(dir)$
\ifxetex
% load bidi as late as possible as it modifies e.g. graphicx
$if(latex-dir-rtl)$
\usepackage[RTLdocument]{bidi}
$else$
\usepackage{bidi}
$endif$
\fi
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
\newcommand{\LR}[1]{\beginL #1\endL}
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
$endif$
$for(header-includes)$
$header-includes$
$endfor$
%-------------------------- Kopf/Fußzeilen
\usepackage[footsepline=true]{scrlayer-scrpage}
\setkomafont{pageheadfoot}{\normalfont\footnotesize}
\setkomafont{footsepline}{\color{dwp-darkblue}}
\lofoot{DARIAH-DE Working Papers$if(wpno)$ Nr.~$wpno$$endif$}
\cofoot{}
\rofoot{\thepage}
\pagestyle{scrheadings}
%----------------------------------
%-------------------------- Titelei
%----------------------------------
$if(title)$
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
$endif$
$if(subtitle)$
\providecommand{\subtitle}[1]{}
\subtitle{$subtitle$}
$endif$
$if(longauthor)$\author{$for(longauthor)$$longauthor$$sep$ \and $endfor$}
$else$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$endif$
\date{$if(institute)$$for(institute)$\mbox{$institute$}$sep$\hspace{2em} $endfor$ $endif$}
\publishers{%
\centerline{\includegraphics{Logo_Working-Papers.pdf}}%
}
\makeatletter
\newcommand{\kaestel}[1]{\gdef\@thanks{%
#1%
}}%
\newcommand{\numbername}{No.}
\newcommand{\licenseblurb}{%
This paper is published under the \\
licence \visiblehref{http://creativecommons.org/licenses/by/4.0/}{Creative-Commons Attribution 4.0}~(CC-BY).
\par\smallskip
The \emph{DARIAH-DE Working Papers} are published by Mirjam Blümm,
Thomas Kollatz, Stefan Schmunk and Christof Schöch.}
\gappto\captionsgerman{%
\renewcommand{\numbername}{Nr.}
\renewcommand{\licenseblurb}{%
\centering
Dieser Beitrag erscheint unter der \\
Lizenz \visiblehref{http://creativecommons.org/licenses/by/4.0/}{Creative-Commons Attribution 4.0}~(CC-BY).
\par\smallskip
Die \emph{DARIAH-DE Working Papers} werden von Mirjam Blümm,
Thomas Kollatz, Stefan Schmunk und Christof Schöch herausgegeben.}}
\makeatother
\kaestel{%
\enlargethispage{2cm}
\vfill
\footnotesize
\fcolorbox{lightgray}{white}{\begin{minipage}{\textwidth}
\centering
{%
\bfseries
$for(author)$$author$$sep$, $endfor$: \enquote{$title$}.
\emph{\visiblehref{https://de.dariah.eu/working-papers}{DARIAH-DE Working Papers}} \numbername~$if(wpno)$$wpno$$else$\todo{wpno}$endif$.
Göttingen: DARIAH-DE, $if(date)$$date$$else$\todo{date}$endif$.
$if(doi)$DOI:~\visiblehref{https://doi.org/$doi$}{$doi$}$elseif(urn)$URN:~\visiblehref{http://nbn-resolving.org/$urn$}{$urn$}$else$\todo{doi}$endif$.%
}\par
\medskip
\includegraphics{CC-BY_icon}\hfill
\begin{minipage}[b]{\textwidth-7cm}
\centering
\licenseblurb
$if(guesteditor)$\par{}$guesteditor$$endif$
\end{minipage}\hfill
\includegraphics{BMBF_Logo}
\end{minipage}}%
$if(report-number)$\par\medskip\fcolorbox{lightgray}{white}{\begin{minipage}{\textwidth}
Dieser Beitrag ist ursprünglich im $if(report-date)$$report-date$$else$\todo{report-date}$endif$ als Report~$report-number$ im Rahmen von DARIAH-DE (BMBF, Förderkennzeichen~$if(report-fkz)$$report-fkz$$else$01UG1110A-N$endif$) entstanden.
\end{minipage}%
}$endif$
$if(publish-note)$\par\medskip\fcolorbox{lightgray}{white}{\begin{minipage}{\textwidth}
$publish-note$. $if(urn-alt)$URN:~\visiblehref{http://nbn-resolving.org/$urn-alt$}{$urn-alt$}.$endif$
\end{minipage}}%
$endif$}
\begin{document}
$if(draft)$$else$
$if(title)$
\maketitle
$endif$
%---------------------------- Zweite Seite der Titelei: abstract, keywords-de, keywords-en
$if(abstract)$
\section*{\abstractname}
$abstract$
$endif$
\let\href\footnotehref
$if(keywords-de)$
\section*{Schlagwörter}
$for(keywords-de)$$keywords-de$$sep$, $endfor$
$else$
$if(keywords)$
\todo{Please provide English and German keywords in fields keywords-de and keywords-en.}
$endif$
$endif$
$if(keywords-en)$
\section*{Keywords}
$for(keywords-en)$$keywords-en$$sep$, $endfor$
$else$
$if(keywords)$
\todo{Please provide English and German keywords in fields keywords-de and keywords-en.}
$endif$
$endif$
$for(include-before)$
$include-before$
$endfor$
%---------------------------- Dritte Seite der Titelei: Inhaltsverzeichnis
\clearpage
{
$if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
$endif$
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
$if(lot)$
\listoftables
$endif$
$if(lof)$
\listoffigures
$endif$
$endif$
%---------------------------- Bibliographie vorbereiten
% Am Ende jeder Datei mit Literaturverzeichnis sollte das hier stehen:
\newcommand{\biblio}{%
\clearpage
\addsec{\bibname}
\let\href\visiblehref%
}
%---------------------------- Jetzt geht's los ...
\cleardoublepage
$body$
$if(natbib)$
$if(bibliography)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{$biblio-title$}
$else$
\renewcommand\refname{$biblio-title$}
$endif$
$endif$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}