@@ -2,14 +2,40 @@
22\PassOptionsToPackage{hyphens}{url}
33$if(colorlinks)$
44\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
5−$endif$$if(dir)$$if(latex-dir-rtl)$
5+$endif$
6+$if(dir)$
7+$if(latex-dir-rtl)$
68\PassOptionsToPackage{RTLdocument}{bidi}
7−$endif$$endif$%
8−\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
9+$endif$
10+$endif$
11+%
12+\documentclass[
13+$if(fontsize)$
14+ $fontsize$,
15+$endif$
16+$if(lang)$
17+ $babel-lang$,
18+$endif$
19+$if(papersize)$
20+ $papersize$paper,
21+$endif$
22+$if(beamer)$
23+ ignorenonframetext,
24+$if(handout)$
25+ handout,
26+$endif$
27+$if(aspectratio)$
28+ aspectratio=$aspectratio$,
29+$endif$
30+$endif$
31+$for(classoption)$
32+ $classoption$$sep$,
33+$endfor$
34+]{$documentclass$}
935$if(beamer)$
1036$if(background-image)$
1137\usebackgroundtemplate{%
12−\includegraphics[width=\paperwidth]{$background-image$}%
38+ \includegraphics[width=\paperwidth]{$background-image$}%
1339}
1440$endif$
1541\usepackage{pgfpages}
@@ -25,22 +51,22 @@ $endfor$
2551\raggedbottom
2652$if(section-titles)$
2753\setbeamertemplate{part page}{
28−\centering
29−\begin{beamercolorbox}[sep=16pt,center]{part title}
30− \usebeamerfont{part title}\insertpart\par
31−\end{beamercolorbox}
54+ \centering
55+ \begin{beamercolorbox}[sep=16pt,center]{part title}
56+ \usebeamerfont{part title}\insertpart\par
57+ \end{beamercolorbox}
3258}
3359\setbeamertemplate{section page}{
34−\centering
35−\begin{beamercolorbox}[sep=12pt,center]{part title}
36− \usebeamerfont{section title}\insertsection\par
37−\end{beamercolorbox}
60+ \centering
61+ \begin{beamercolorbox}[sep=12pt,center]{part title}
62+ \usebeamerfont{section title}\insertsection\par
63+ \end{beamercolorbox}
3864}
3965\setbeamertemplate{subsection page}{
40−\centering
41−\begin{beamercolorbox}[sep=8pt,center]{part title}
42− \usebeamerfont{subsection title}\insertsubsection\par
43−\end{beamercolorbox}
66+ \centering
67+ \begin{beamercolorbox}[sep=8pt,center]{part title}
68+ \usebeamerfont{subsection title}\insertsubsection\par
69+ \end{beamercolorbox}
4470}
4571\AtBeginPart{
4672 \frame{\partpage}
@@ -89,16 +115,16 @@ $for(fontfamilies)$
89115 \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
90116$endfor$
91117$if(mainfont)$
92− \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
118+ \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
93119$endif$
94120$if(romanfont)$
95− \setromanfont[$for(romanfontoptions)$$romanfontoptions$$sep$,$endfor$]{$romanfont$}
121+ \setromanfont[$for(romanfontoptions)$$romanfontoptions$$sep$,$endfor$]{$romanfont$}
96122$endif$
97123$if(sansfont)$
98− \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
124+ \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
99125$endif$
100126$if(monofont)$
101− \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
127+ \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
102128$endif$
103129$if(mathfont)$
104130$if(mathspec)$
@@ -151,21 +177,20 @@ $endif$
151177$endif$
152178% use upquote if available, for straight quotes in verbatim environments
153179\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
154−% use microtype if available
155−\IfFileExists{microtype.sty}{%
156−\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
157−\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
180+\IfFileExists{microtype.sty}{% use microtype if available
181+ \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
182+ \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
158183}{}
159184$if(indent)$
160185$else$
161186\makeatletter
162−\@ifundefined{KOMAClassName}{%
187+\@ifundefined{KOMAClassName}{% if non-KOMA class
163188 \IfFileExists{parskip.sty}{%
164189 \usepackage{parskip}
165190 }{% else
166191 \setlength{\parindent}{0pt}
167192 \setlength{\parskip}{6pt plus 2pt minus 1pt}}
168−}{% else
193+}{% if KOMA class
169194 \KOMAoptions{parskip=half}}
170195\makeatother
171196$endif$
@@ -177,24 +202,24 @@ $endif$
177202\usepackage{hyperref}
178203\hypersetup{
179204$if(title-meta)$
180− pdftitle={$title-meta$},
205+ pdftitle={$title-meta$},
181206$endif$
182207$if(author-meta)$
183− pdfauthor={$author-meta$},
208+ pdfauthor={$author-meta$},
184209$endif$
185210$if(keywords)$
186− pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
211+ pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
187212$endif$
188213$if(colorlinks)$
189− colorlinks=true,
190− linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
191− filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
192− citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
193− urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
214+ colorlinks=true,
215+ linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
216+ filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
217+ citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
218+ urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
194219$else$
195− pdfborder={0 0 0},
220+ pdfborder={0 0 0},
196221$endif$
197− breaklinks=true}
222+ breaklinks=true}
198223\urlstyle{same} % don't use monospace font for urls
199224$if(verbatim-in-note)$
200225\VerbatimFootnotes % allows verbatim text in footnotes
@@ -262,12 +287,12 @@ $if(subparagraph)$
262287$else$
263288% Redefines (sub)paragraphs to behave more like sections
264289\ifx\paragraph\undefined\else
265−\let\oldparagraph\paragraph
266−\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
290+ \let\oldparagraph\paragraph
291+ \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
267292\fi
268293\ifx\subparagraph\undefined\else
269−\let\oldsubparagraph\subparagraph
270−\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
294+ \let\oldsubparagraph\subparagraph
295+ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
271296\fi
272297$endif$
273298$endif$
@@ -371,9 +396,9 @@ $endif$
371396$if(beamer)$
372397\begin{frame}
373398$if(toc-title)$
374−\frametitle{$toc-title$}
399+ \frametitle{$toc-title$}
375400$endif$
376−\tableofcontents[hideallsubsections]
401+ \tableofcontents[hideallsubsections]
377402\end{frame}
378403$else$
379404{
@@ -404,9 +429,9 @@ $endif$
404429$endif$
405430$if(beamer)$
406431\begin{frame}[allowframebreaks]{$biblio-title$}
407−\bibliographytrue
432+ \bibliographytrue
408433$endif$
409−\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
434+ \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
410435$if(beamer)$
411436\end{frame}
412437$endif$
@@ -416,8 +441,8 @@ $endif$
416441$if(biblatex)$
417442$if(beamer)$
418443\begin{frame}[allowframebreaks]{$biblio-title$}
419−\bibliographytrue
420−\printbibliography[heading=none]
444+ \bibliographytrue
445+ \printbibliography[heading=none]
421446\end{frame}
422447$else$
423448\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$