@@ -1,4 +1,7 @@
1\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
1\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
3+\usepackage{beamerarticle} % needs to be loaded first
2$if(fontfamily)$
5$if(fontfamily)$
3\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
6\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
@@ -24,6 +27,9 @@ $endif$
24 \usepackage{fontspec}
27 \usepackage{fontspec}
26 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
29 \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
31+ \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
28 \newcommand{\euro}{€}
34 \newcommand{\euro}{€}
@@ -48,18 +54,18 @@ $endif$
48\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
54\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
49% use microtype if available
55% use microtype if available
50\IfFileExists{microtype.sty}{%
56\IfFileExists{microtype.sty}{%
51−\usepackage{microtype}
57+\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
52\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
58\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
54$if(geometry)$
60$if(geometry)$
55\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
61\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
57\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
63\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
58−\usepackage{hyperref}
64+\usepackage[unicode=true]{hyperref}
59$if(colorlinks)$
65$if(colorlinks)$
60\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
66\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
62−\hypersetup{unicode=true,
68+\hypersetup{
63$if(title-meta)$
69$if(title-meta)$
64 pdftitle={$title-meta$},
70 pdftitle={$title-meta$},
@@ -67,7 +73,7 @@ $if(author-meta)$
67 pdfauthor={$author-meta$},
73 pdfauthor={$author-meta$},
69$if(keywords)$
75$if(keywords)$
70− pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
76+ pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
72$if(colorlinks)$
78$if(colorlinks)$
73 colorlinks=true,
79 colorlinks=true,
@@ -98,8 +104,7 @@ $if(natbib)$
98\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
104\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
100$if(biblatex)$
106$if(biblatex)$
101−\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex}
102−$if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$
107+\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
103$for(bibliography)$
108$for(bibliography)$
104\addbibresource{$bibliography$}
109\addbibresource{$bibliography$}
@@ -119,6 +124,8 @@ $if(verbatim-in-note)$
120$if(tables)$
125$if(tables)$
121\usepackage{longtable,booktabs}
126\usepackage{longtable,booktabs}
127+% Fix footnotes in tables (requires footnote package)
128+\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{long table}}{}
123$if(graphics)$
130$if(graphics)$
124\usepackage{graphicx,grffile}
131\usepackage{graphicx,grffile}
@@ -153,7 +160,7 @@ $endif$
153\providecommand{\tightlist}{%
160\providecommand{\tightlist}{%
154 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
161 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
155$if(numbersections)$
162$if(numbersections)$
156−\setcounter{secnumdepth}{5}
163+\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
158\setcounter{secnumdepth}{0}
165\setcounter{secnumdepth}{0}
@@ -186,6 +193,12 @@ $if(dir)$
186 \newenvironment{LTR}{\beginL}{\endL}
193 \newenvironment{LTR}{\beginL}{\endL}
197+% set default figure placement to htbp
199+\def\fps@figure{htbp}
189$for(header-includes)$
202$for(header-includes)$
190$header-includes$
203$header-includes$
@@ -201,6 +214,7 @@ $if(author)$
201\author{$for(author)$$author$$sep$ \and $endfor$}
214\author{$for(author)$$author$$sep$ \and $endfor$}
203$if(institute)$
216$if(institute)$
217+\providecommand{\institute}[1]{}
204\institute{$for(institute)$$institute$$sep$ \and $endfor$}
218\institute{$for(institute)$$institute$$sep$ \and $endfor$}
206\date{$date$}
220\date{$date$}