summaryrefslogtreecommitdiff
path: root/template.tex
diff options
context:
space:
mode:
Diffstat (limited to 'template.tex')
-rw-r--r--template.tex488
1 files changed, 488 insertions, 0 deletions
diff --git a/template.tex b/template.tex
new file mode 100644
index 0000000..44a7322
--- /dev/null
+++ b/template.tex
@@ -0,0 +1,488 @@
1% Options for packages loaded elsewhere
2\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
3\PassOptionsToPackage{hyphens}{url}
4$if(colorlinks)$
5\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
6$endif$
7$if(dir)$
8$if(latex-dir-rtl)$
9\PassOptionsToPackage{RTLdocument}{bidi}
10$endif$
11$endif$
12%
13\documentclass[
14$if(fontsize)$
15 $fontsize$,
16$endif$
17$if(lang)$
18 $babel-lang$,
19$endif$
20$if(papersize)$
21 $papersize$paper,
22$endif$
23$if(beamer)$
24 ignorenonframetext,
25$if(handout)$
26 handout,
27$endif$
28$if(aspectratio)$
29 aspectratio=$aspectratio$,
30$endif$
31$endif$
32$for(classoption)$
33 $classoption$$sep$,
34$endfor$
35]{$documentclass$}
36$if(beamer)$
37$if(background-image)$
38\usebackgroundtemplate{%
39 \includegraphics[width=\paperwidth]{$background-image$}%
40}
41$endif$
42\usepackage{pgfpages}
43\setbeamertemplate{caption}[numbered]
44\setbeamertemplate{caption label separator}{: }
45\setbeamercolor{caption name}{fg=normal text.fg}
46\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
47$for(beameroption)$
48\setbeameroption{$beameroption$}
49$endfor$
50% Prevent slide breaks in the middle of a paragraph
51\widowpenalties 1 10000
52\raggedbottom
53$if(section-titles)$
54\setbeamertemplate{part page}{
55 \centering
56 \begin{beamercolorbox}[sep=16pt,center]{part title}
57 \usebeamerfont{part title}\insertpart\par
58 \end{beamercolorbox}
59}
60\setbeamertemplate{section page}{
61 \centering
62 \begin{beamercolorbox}[sep=12pt,center]{part title}
63 \usebeamerfont{section title}\insertsection\par
64 \end{beamercolorbox}
65}
66\setbeamertemplate{subsection page}{
67 \centering
68 \begin{beamercolorbox}[sep=8pt,center]{part title}
69 \usebeamerfont{subsection title}\insertsubsection\par
70 \end{beamercolorbox}
71}
72\AtBeginPart{
73 \frame{\partpage}
74}
75\AtBeginSection{
76 \ifbibliography
77 \else
78 \frame{\sectionpage}
79 \fi
80}
81\AtBeginSubsection{
82 \frame{\subsectionpage}
83}
84$endif$
85$endif$
86$if(beamerarticle)$
87\usepackage{beamerarticle} % needs to be loaded first
88$endif$
89$if(fontfamily)$
90\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
91$else$
92\usepackage{lmodern}
93$endif$
94$if(linestretch)$
95\usepackage{setspace}
96$endif$
97\usepackage{amssymb,amsmath}
98\usepackage{ifxetex,ifluatex}
99\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
100 \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
101 \usepackage[utf8]{inputenc}
102 \usepackage{textcomp} % provide euro and other symbols
103\else % if luatex or xetex
104$if(mathspec)$
105 \ifxetex
106 \usepackage{mathspec}
107 \else
108 \usepackage{unicode-math}
109 \fi
110$else$
111 \usepackage{unicode-math}
112$endif$
113 \defaultfontfeatures{Scale=MatchLowercase}
114 \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
115$if(mainfont)$
116 \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
117$endif$
118$if(sansfont)$
119 \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
120$endif$
121$if(monofont)$
122 \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
123$endif$
124$for(fontfamilies)$
125 \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
126$endfor$
127$if(mathfont)$
128$if(mathspec)$
129 \ifxetex
130 \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
131 \else
132 \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
133 \fi
134$else$
135 \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
136$endif$
137$endif$
138$if(CJKmainfont)$
139 \ifxetex
140 \usepackage{xeCJK}
141 \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
142 \fi
143$endif$
144$if(luatexjapresetoptions)$
145 \ifluatex
146 \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
147 \fi
148$endif$
149$if(CJKmainfont)$
150 \ifluatex
151 \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
152 \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
153 \fi
154$endif$
155\fi
156$if(beamer)$
157$if(theme)$
158\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
159$endif$
160$if(colortheme)$
161\usecolortheme{$colortheme$}
162$endif$
163$if(fonttheme)$
164\usefonttheme{$fonttheme$}
165$endif$
166$if(mainfont)$
167\usefonttheme{serif} % use mainfont rather than sansfont for slide text
168$endif$
169$if(innertheme)$
170\useinnertheme{$innertheme$}
171$endif$
172$if(outertheme)$
173\useoutertheme{$outertheme$}
174$endif$
175$endif$
176% Use upquote if available, for straight quotes in verbatim environments
177\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
178\IfFileExists{microtype.sty}{% use microtype if available
179 \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
180 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
181}{}
182$if(indent)$
183$else$
184\makeatletter
185\@ifundefined{KOMAClassName}{% if non-KOMA class
186 \IfFileExists{parskip.sty}{%
187 \usepackage{parskip}
188 }{% else
189 \setlength{\parindent}{0pt}
190 \setlength{\parskip}{6pt plus 2pt minus 1pt}}
191}{% if KOMA class
192 \KOMAoptions{parskip=half}}
193\makeatother
194$endif$
195$if(verbatim-in-note)$
196\usepackage{fancyvrb}
197$endif$
198\usepackage{xcolor}
199\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
200\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
201\hypersetup{
202$if(title-meta)$
203 pdftitle={$title-meta$},
204$endif$
205$if(author-meta)$
206 pdfauthor={$author-meta$},
207$endif$
208$if(subject)$
209 pdfsubject={$subject$},
210$endif$
211$if(keywords)$
212 pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
213$endif$
214$if(colorlinks)$
215 colorlinks=true,
216 linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
217 filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
218 citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
219 urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
220$else$
221 hidelinks,
222$endif$
223 pdfcreator={LaTeX via pandoc}}
224\urlstyle{same} % disable monospaced font for URLs
225$if(verbatim-in-note)$
226\VerbatimFootnotes % allow verbatim text in footnotes
227$endif$
228$if(geometry)$
229\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
230$endif$
231$if(beamer)$
232\newif\ifbibliography
233$endif$
234$if(listings)$
235\usepackage{listings}
236\newcommand{\passthrough}[1]{#1}
237\lstset{defaultdialect=[5.3]Lua}
238\lstset{defaultdialect=[x86masm]Assembler}
239$endif$
240$if(lhs)$
241\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
242$endif$
243$if(highlighting-macros)$
244$highlighting-macros$
245$endif$
246$if(tables)$
247\usepackage{longtable,booktabs}
248$if(beamer)$
249\usepackage{caption}
250% Make caption package work with longtable
251\makeatletter
252\def\fnum@table{\tablename~\thetable}
253\makeatother
254$else$
255% Correct order of tables after \paragraph or \subparagraph
256\usepackage{etoolbox}
257\makeatletter
258\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
259\makeatother
260% Allow footnotes in longtable head/foot
261\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
262\makesavenoteenv{longtable}
263$endif$
264$endif$
265$if(graphics)$
266\usepackage{graphicx,grffile}
267\makeatletter
268\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
269\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
270\makeatother
271% Scale images if necessary, so that they will not overflow the page
272% margins by default, and it is still possible to overwrite the defaults
273% using explicit options in \includegraphics[width, height, ...]{}
274\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
275% Set default figure placement to htbp
276\makeatletter
277\def\fps@figure{htbp}
278\makeatother
279$endif$
280$if(links-as-notes)$
281% Make links footnotes instead of hotlinks:
282\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
283$endif$
284$if(strikeout)$
285\usepackage[normalem]{ulem}
286% Avoid problems with \sout in headers with hyperref
287\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
288$endif$
289\setlength{\emergencystretch}{3em} % prevent overfull lines
290\providecommand{\tightlist}{%
291 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
292$if(numbersections)$
293\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
294$else$
295\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
296$endif$
297$if(beamer)$
298$else$
299$if(block-headings)$
300% Make \paragraph and \subparagraph free-standing
301\ifx\paragraph\undefined\else
302 \let\oldparagraph\paragraph
303 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
304\fi
305\ifx\subparagraph\undefined\else
306 \let\oldsubparagraph\subparagraph
307 \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
308\fi
309$endif$
310$endif$
311$if(pagestyle)$
312\pagestyle{$pagestyle$}
313$endif$
314$for(header-includes)$
315$header-includes$
316$endfor$
317$if(lang)$
318\ifxetex
319 % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
320 \usepackage{polyglossia}
321 \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
322$for(polyglossia-otherlangs)$
323 \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
324$endfor$
325\else
326 \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
327$if(babel-newcommands)$
328 $babel-newcommands$
329$endif$
330\fi
331$endif$
332$if(dir)$
333\ifxetex
334 % Load bidi as late as possible as it modifies e.g. graphicx
335 \usepackage{bidi}
336\fi
337\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
338 \TeXXeTstate=1
339 \newcommand{\RL}[1]{\beginR #1\endR}
340 \newcommand{\LR}[1]{\beginL #1\endL}
341 \newenvironment{RTL}{\beginR}{\endR}
342 \newenvironment{LTR}{\beginL}{\endL}
343\fi
344$endif$
345$if(natbib)$
346\usepackage[$natbiboptions$]{natbib}
347\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
348$endif$
349$if(biblatex)$
350\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
351$for(bibliography)$
352\addbibresource{$bibliography$}
353$endfor$
354$endif$
355
356$if(title)$
357\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
358$endif$
359$if(subtitle)$
360$if(beamer)$
361$else$
362\usepackage{etoolbox}
363\makeatletter
364\providecommand{\subtitle}[1]{% add subtitle to \maketitle
365 \apptocmd{\@title}{\par {\large #1 \par}}{}{}
366}
367\makeatother
368$endif$
369\subtitle{$subtitle$}
370$endif$
371$if(author)$
372\author{$for(author)$$author$$sep$ \and $endfor$}
373$endif$
374\date{$date$}
375$if(beamer)$
376$if(institute)$
377\institute{$for(institute)$$institute$$sep$ \and $endfor$}
378$endif$
379$if(titlegraphic)$
380\titlegraphic{\includegraphics{$titlegraphic$}}
381$endif$
382$if(logo)$
383\logo{\includegraphics{$logo$}}
384$endif$
385$endif$
386
387\begin{document}
388$if(has-frontmatter)$
389\frontmatter
390$endif$
391$if(title)$
392$if(beamer)$
393\frame{\titlepage}
394$else$
395\maketitle
396$endif$
397$if(abstract)$
398\begin{abstract}
399$abstract$
400\end{abstract}
401$endif$
402$endif$
403
404$for(include-before)$
405$include-before$
406
407$endfor$
408$if(toc)$
409$if(toc-title)$
410\renewcommand*\contentsname{$toc-title$}
411$endif$
412$if(beamer)$
413\begin{frame}
414$if(toc-title)$
415 \frametitle{$toc-title$}
416$endif$
417 \tableofcontents[hideallsubsections]
418\end{frame}
419$else$
420{
421$if(colorlinks)$
422\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
423$endif$
424\setcounter{tocdepth}{$toc-depth$}
425\tableofcontents
426}
427$endif$
428$endif$
429$if(lot)$
430\listoftables
431$endif$
432$if(lof)$
433\listoffigures
434$endif$
435$if(linestretch)$
436\setstretch{$linestretch$}
437$endif$
438$if(has-frontmatter)$
439\mainmatter
440$endif$
441$body$
442
443$if(has-frontmatter)$
444\backmatter
445$endif$
446$if(natbib)$
447$if(bibliography)$
448$if(biblio-title)$
449$if(has-chapters)$
450\renewcommand\bibname{$biblio-title$}
451$else$
452\renewcommand\refname{$biblio-title$}
453$endif$
454$endif$
455$if(beamer)$
456\begin{frame}[allowframebreaks]{$biblio-title$}
457 \bibliographytrue
458$endif$
459 \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
460$if(beamer)$
461\end{frame}
462$endif$
463
464$endif$
465$endif$
466$if(biblatex)$
467$if(beamer)$
468\begin{frame}[allowframebreaks]{$biblio-title$}
469 \bibliographytrue
470 \printbibliography[heading=none]
471\end{frame}
472$else$
473\printbibliography[
474$if(biblio-title)$
475 title=$biblio-title$,
476$endif$
477$if(biblio-heading)$
478 heading=$biblio-heading$,
479$endif$
480]
481$endif$
482
483$endif$
484$for(include-after)$
485$include-after$
486
487$endfor$
488\end{document}