|
|
@ -49,6 +49,9 @@ $if(latex-dir-rtl)$ |
|
|
|
\PassOptionsToPackage{RTLdocument}{bidi} |
|
|
|
$endif$ |
|
|
|
$endif$ |
|
|
|
$if(CJKmainfont)$ |
|
|
|
\PassOptionsToPackage{space}{xeCJK} |
|
|
|
$endif$ |
|
|
|
% |
|
|
|
\documentclass[ |
|
|
|
$if(fontsize)$ |
|
|
@ -74,7 +77,7 @@ $endif$ |
|
|
|
$for(classoption)$ |
|
|
|
$classoption$$sep$, |
|
|
|
$endfor$ |
|
|
|
,captions=tableheading |
|
|
|
,captions=tableheading |
|
|
|
]{$if(beamer)$$documentclass$$else$$if(book)$scrbook$else$scrartcl$endif$$endif$} |
|
|
|
$if(beamer)$ |
|
|
|
$if(background-image)$ |
|
|
@ -141,15 +144,17 @@ $else$ |
|
|
|
\usepackage{setspace} |
|
|
|
\setstretch{1.2} |
|
|
|
$endif$ |
|
|
|
\usepackage{amssymb,amsmath} |
|
|
|
\usepackage{amsmath} |
|
|
|
\usepackage{ifxetex,ifluatex} |
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex |
|
|
|
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} |
|
|
|
\usepackage[utf8]{inputenc} |
|
|
|
\usepackage{textcomp} % provide euro and other symbols |
|
|
|
\usepackage{amssymb} |
|
|
|
\else % if luatex or xetex |
|
|
|
$if(mathspec)$ |
|
|
|
\ifxetex |
|
|
|
\usepackage{amssymb} |
|
|
|
\usepackage{mathspec} |
|
|
|
\else |
|
|
|
\usepackage{unicode-math} |
|
|
@ -369,6 +374,10 @@ $if(graphics)$ |
|
|
|
% 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} |
|
|
|
% Set default figure placement to htbp |
|
|
|
\makeatletter |
|
|
|
\def\fps@figure{htbp} |
|
|
|
\makeatother |
|
|
|
$endif$ |
|
|
|
$if(links-as-notes)$ |
|
|
|
% Make links footnotes instead of hotlinks: |
|
|
@ -379,11 +388,11 @@ $if(strikeout)$ |
|
|
|
% Avoid problems with \sout in headers with hyperref |
|
|
|
\pdfstringdefDisableCommands{\renewcommand{\sout}{}} |
|
|
|
$endif$ |
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines |
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines |
|
|
|
\providecommand{\tightlist}{% |
|
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} |
|
|
|
$if(numbersections)$ |
|
|
|
\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$3$endif$} |
|
|
|
\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} |
|
|
|
$else$ |
|
|
|
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering |
|
|
|
$endif$ |
|
|
@ -422,9 +431,9 @@ $if(lang)$ |
|
|
|
$endif$ |
|
|
|
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) |
|
|
|
\usepackage{polyglossia} |
|
|
|
\setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} |
|
|
|
\setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$} |
|
|
|
$for(polyglossia-otherlangs)$ |
|
|
|
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} |
|
|
|
\setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$} |
|
|
|
$endfor$ |
|
|
|
\else |
|
|
|
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} |
|
|
@ -433,6 +442,9 @@ $if(babel-newcommands)$ |
|
|
|
$endif$ |
|
|
|
\fi |
|
|
|
$endif$ |
|
|
|
\ifluatex |
|
|
|
\usepackage{selnolig} % disable illegal ligatures |
|
|
|
\fi |
|
|
|
$if(dir)$ |
|
|
|
\ifxetex |
|
|
|
% Load bidi as late as possible as it modifies e.g. graphicx |
|
|
@ -459,10 +471,24 @@ $endif$ |
|
|
|
$if(csl-refs)$ |
|
|
|
\newlength{\cslhangindent} |
|
|
|
\setlength{\cslhangindent}{1.5em} |
|
|
|
\newenvironment{cslreferences}% |
|
|
|
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}% |
|
|
|
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}% |
|
|
|
{\par} |
|
|
|
\newlength{\csllabelwidth} |
|
|
|
\setlength{\csllabelwidth}{3em} |
|
|
|
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing |
|
|
|
{% don't indent paragraphs |
|
|
|
\setlength{\parindent}{0pt} |
|
|
|
% turn on hanging indent if param 1 is 1 |
|
|
|
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi |
|
|
|
% set entry spacing |
|
|
|
\ifnum #2 > 0 |
|
|
|
\setlength{\parskip}{#2\baselineskip} |
|
|
|
\fi |
|
|
|
}% |
|
|
|
{} |
|
|
|
\usepackage{calc} % for \widthof, \maxof |
|
|
|
\newcommand{\CSLBlock}[1]{#1\hfill\break} |
|
|
|
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\maxof{\widthof{#1}}{\csllabelwidth}}{#1}} |
|
|
|
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth}{#1}} |
|
|
|
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} |
|
|
|
$endif$ |
|
|
|
|
|
|
|
$if(title)$ |
|
|
@ -480,9 +506,7 @@ $else$ |
|
|
|
$endif$ |
|
|
|
\subtitle{$subtitle$} |
|
|
|
$endif$ |
|
|
|
$if(author)$ |
|
|
|
\author{$for(author)$$author$$sep$ \and $endfor$} |
|
|
|
$endif$ |
|
|
|
\date{$date$} |
|
|
|
$if(beamer)$ |
|
|
|
$if(institute)$ |
|
|
@ -958,7 +982,7 @@ $if(toc-title)$ |
|
|
|
\renewcommand*\contentsname{$toc-title$} |
|
|
|
$endif$ |
|
|
|
$if(beamer)$ |
|
|
|
\begin{frame} |
|
|
|
\begin{frame}[allowframebreaks] |
|
|
|
$if(toc-title)$ |
|
|
|
\frametitle{$toc-title$} |
|
|
|
$endif$ |
|
|
@ -972,7 +996,7 @@ $else$ |
|
|
|
$if(colorlinks)$ |
|
|
|
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} |
|
|
|
$endif$ |
|
|
|
\setcounter{tocdepth}{$if(toc-depth)$$toc-depth$$else$3$endif$} |
|
|
|
\setcounter{tocdepth}{$toc-depth$} |
|
|
|
\tableofcontents |
|
|
|
$if(toc-own-page)$ |
|
|
|
\newpage |
|
|
|