Commit 0117a30c authored by Axel Dürkop's avatar Axel Dürkop
Browse files

Update LaTeX-Konfiguration

parent 3bc00c7d
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} % Version for pandoc 2.7.3, 12.06.2019
%%%
\usepackage{pdfpages} % Options for packages loaded elsewhere
\usepackage{hyperxmp} \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\PassOptionsToPackage{hyphens}{url}
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
$endif$
$if(dir)$
$if(latex-dir-rtl)$
\PassOptionsToPackage{RTLdocument}{bidi}
$endif$
$endif$
%
\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$}
$if(beamer)$
$if(background-image)$
\usebackgroundtemplate{%
\includegraphics[width=\paperwidth]{$background-image$}%
}
$endif$
\usepackage{pgfpages}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
$for(beameroption)$
\setbeameroption{$beameroption$}
$endfor$
% Prevent slide breaks in the middle of a paragraph
\widowpenalties 1 10000
\raggedbottom
$if(section-titles)$
\setbeamertemplate{part page}{
\centering
\begin{beamercolorbox}[sep=16pt,center]{part title}
\usebeamerfont{part title}\insertpart\par
\end{beamercolorbox}
}
\setbeamertemplate{section page}{
\centering
\begin{beamercolorbox}[sep=12pt,center]{part title}
\usebeamerfont{section title}\insertsection\par
\end{beamercolorbox}
}
\setbeamertemplate{subsection page}{
\centering
\begin{beamercolorbox}[sep=8pt,center]{part title}
\usebeamerfont{subsection title}\insertsubsection\par
\end{beamercolorbox}
}
\AtBeginPart{
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\frame{\subsectionpage}
}
$endif$
$endif$
$if(beamerarticle)$
\usepackage{beamerarticle} % needs to be loaded first
$endif$
$if(fontfamily)$ $if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$ $else$
...@@ -9,107 +96,156 @@ $else$ ...@@ -9,107 +96,156 @@ $else$
$endif$ $endif$
$if(linestretch)$ $if(linestretch)$
\usepackage{setspace} \usepackage{setspace}
\setstretch{$linestretch$}
$endif$ $endif$
\usepackage{cleveref}
\usepackage{amssymb,amsmath} \usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex} \usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
$if(euro)$ \usepackage{textcomp} % provide euro and other symbols
\usepackage{eurosym} \else % if luatex or xetex
$endif$ $if(mathspec)$
\else % if luatex or xelatex
\ifxetex \ifxetex
\usepackage{mathspec} \usepackage{mathspec}
\else \else
\usepackage{fontspec} \usepackage{unicode-math}
\fi \fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} $else$
$if(euro)$ \usepackage{unicode-math}
\newcommand{\euro}{}
$endif$ $endif$
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
$if(mainfont)$ $if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$ $endif$
$if(sansfont)$ $if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$endif$ $endif$
$if(monofont)$ $if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
$endif$ $endif$
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
$endfor$
$if(mathfont)$ $if(mathfont)$
$if(mathspec)$
\ifxetex
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\else
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\fi
$else$
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$endif$ $endif$
$if(CJKmainfont)$ $if(CJKmainfont)$
\ifxetex
\usepackage{xeCJK} \usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
\fi
$endif$
$if(luatexjapresetoptions)$
\ifluatex
\usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
\fi
$endif$
$if(CJKmainfont)$
\ifluatex
\usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
\setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
\fi
$endif$ $endif$
\fi \fi
% use upquote if available, for straight quotes in verbatim environments $if(beamer)$
$if(theme)$
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
$endif$
$if(colortheme)$
\usecolortheme{$colortheme$}
$endif$
$if(fonttheme)$
\usefonttheme{$fonttheme$}
$endif$
$if(mainfont)$
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
$endif$
$if(innertheme)$
\useinnertheme{$innertheme$}
$endif$
$if(outertheme)$
\useoutertheme{$outertheme$}
$endif$
$endif$
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{} \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available \IfFileExists{microtype.sty}{% use microtype if available
\IfFileExists{microtype.sty}{% \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
\usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{} }{}
$if(geometry)$ $if(indent)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} $else$
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
$endif$ $endif$
\usepackage[pdfa]{hyperref} $if(verbatim-in-note)$
$if(colorlinks)$ \usepackage{fancyvrb}
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
$endif$ $endif$
\hypersetup{unicode=true, \usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
$if(title-meta)$ $if(title-meta)$
pdftitle={$title-meta$}, pdftitle={$title-meta$},
$endif$ $endif$
$if(author-meta)$ $if(author-meta)$
pdfauthor={$author-meta$}, pdfauthor={$author-meta$},
$endif$
$if(lang)$
pdflang={$lang$},
$endif$
$if(subject)$
pdfsubject={$subject$},
$endif$ $endif$
$if(keywords)$ $if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
$endif$ $endif$
$if(colorlinks)$ $if(colorlinks)$
colorlinks=true, colorlinks=true,
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
$else$ $else$
pdfborder={0 0 0}, hidelinks,
$endif$ $endif$
breaklinks=true} pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % don't use monospace font for urls \urlstyle{same} % disable monospaced font for URLs
$if(lang)$ $if(verbatim-in-note)$
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \VerbatimFootnotes % allow verbatim text in footnotes
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$ $endif$
\else $if(geometry)$
\usepackage{polyglossia} $if(beamer)$
\setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} \geometry{$for(geometry)$$geometry$$sep$,$endfor$}
$for(polyglossia-otherlangs)$ $else$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$endfor$
\fi
$endif$ $endif$
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$ $endif$
$if(biblatex)$ $if(beamer)$
\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} \newif\ifbibliography
$if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$
$endif$ $endif$
$if(listings)$ $if(listings)$
\usepackage{listings} \usepackage{listings}
\newcommand{\passthrough}[1]{#1}
\lstset{defaultdialect=[5.3]Lua}
\lstset{defaultdialect=[x86masm]Assembler}
$endif$ $endif$
$if(lhs)$ $if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
...@@ -117,12 +253,24 @@ $endif$ ...@@ -117,12 +253,24 @@ $endif$
$if(highlighting-macros)$ $if(highlighting-macros)$
$highlighting-macros$ $highlighting-macros$
$endif$ $endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(tables)$ $if(tables)$
\usepackage{longtable,booktabs} \usepackage{longtable,booktabs}
$if(beamer)$
\usepackage{caption}
% Make caption package work with longtable
\makeatletter
\def\fnum@table{\tablename~\thetable}
\makeatother
$else$
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
$endif$
$endif$ $endif$
$if(graphics)$ $if(graphics)$
\usepackage{graphicx,grffile} \usepackage{graphicx,grffile}
...@@ -133,54 +281,68 @@ $if(graphics)$ ...@@ -133,54 +281,68 @@ $if(graphics)$
% Scale images if necessary, so that they will not overflow the page % Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults % margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{} % using explicit options in \includegraphics[width, height, ...]{}
% \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
$endif$ $endif$
$if(links-as-notes)$ $if(links-as-notes)$
% Make links footnotes instead of hotlinks: % Make links footnotes instead of hotlinks:
\renewcommand{\href}[2]{#2\footnote{\url{#1}}} \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$ $endif$
$if(strikeout)$ $if(strikeout)$
\usepackage[normalem]{ulem} \usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref: % Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}} \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$ $endif$
$if(indent)$ \setlength{\emergencystretch}{3em} % prevent overfull lines
$else$
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
$endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{% \providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$if(numbersections)$ $if(numbersections)$
\setcounter{secnumdepth}{5} \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
$else$ $else$
\setcounter{secnumdepth}{0} \setcounter{secnumdepth}{-\maxdimen} % remove section numbering
$endif$ $endif$
$if(subparagraph)$ $if(beamer)$
$else$ $else$
% Redefines (sub)paragraphs to behave more like sections $if(block-headings)$
% Make \paragraph and \subparagraph free-standing
\ifx\paragraph\undefined\else \ifx\paragraph\undefined\else
\let\oldparagraph\paragraph \let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi \fi
\ifx\subparagraph\undefined\else \ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph \let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
$endif$
$endif$
$if(pagestyle)$
\pagestyle{$pagestyle$}
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(lang)$
\ifxetex
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\usepackage{polyglossia}
\setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
$for(polyglossia-otherlangs)$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
$endfor$
\else
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\fi \fi
$endif$ $endif$
$if(dir)$ $if(dir)$
\ifxetex \ifxetex
% load bidi as late as possible as it modifies e.g. graphicx % Load bidi as late as possible as it modifies e.g. graphicx
$if(latex-dir-rtl)$
\usepackage[RTLdocument]{bidi}
$else$
\usepackage{bidi} \usepackage{bidi}
$endif$
\fi \fi
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\TeXXeTstate=1 \TeXXeTstate=1
...@@ -190,27 +352,56 @@ $if(dir)$ ...@@ -190,27 +352,56 @@ $if(dir)$
\newenvironment{LTR}{\beginL}{\endL} \newenvironment{LTR}{\beginL}{\endL}
\fi \fi
$endif$ $endif$
$for(header-includes)$ $if(natbib)$
$header-includes$ \usepackage[$natbiboptions$]{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
$for(bibliography)$
\addbibresource{$bibliography$}
$endfor$ $endfor$
$endif$
$if(title)$ $if(title)$
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} \title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
$endif$ $endif$
$if(subtitle)$ $if(subtitle)$
\providecommand{\subtitle}[1]{} $if(beamer)$
$else$
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
$endif$
\subtitle{$subtitle$} \subtitle{$subtitle$}
$endif$ $endif$
$if(author)$ $if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$} \author{$for(author)$$author$$sep$ \and $endfor$}
$endif$ $endif$
\date{$date$}
$if(beamer)$
$if(institute)$ $if(institute)$
\institute{$for(institute)$$institute$$sep$ \and $endfor$} \institute{$for(institute)$$institute$$sep$ \and $endfor$}
$endif$ $endif$
\date{$date$} $if(titlegraphic)$
\titlegraphic{\includegraphics{$titlegraphic$}}
$endif$
$if(logo)$
\logo{\includegraphics{$logo$}}
$endif$
$endif$
\begin{document} \begin{document}
$if(has-frontmatter)$
\frontmatter
$endif$
$if(title)$ $if(title)$
$if(beamer)$
\frame{\titlepage}
$else$
\maketitle \maketitle
$endif$ $endif$
$if(abstract)$ $if(abstract)$
...@@ -218,55 +409,83 @@ $if(abstract)$ ...@@ -218,55 +409,83 @@ $if(abstract)$
$abstract$ $abstract$
\end{abstract} \end{abstract}
$endif$ $endif$
$endif$
$for(include-before)$ $for(include-before)$
$include-before$ $include-before$
$endfor$ $endfor$
$if(toc)$ $if(toc)$
$if(toc-title)$
\renewcommand*\contentsname{$toc-title$}
$endif$
$if(beamer)$
\begin{frame}
$if(toc-title)$
\frametitle{$toc-title$}
$endif$
\tableofcontents[hideallsubsections]
\end{frame}
$else$
{ {
$if(colorlinks)$ $if(colorlinks)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
$endif$ $endif$
\setcounter{tocdepth}{$toc-depth$} \setcounter{tocdepth}{$toc-depth$}
\tableofcontents \tableofcontents
} }
$endif$ $endif$
$endif$
$if(lot)$ $if(lot)$
\listoftables \listoftables
$endif$ $endif$
$if(lof)$ $if(lof)$
\listoffigures \listoffigures
$endif$ $endif$
$if(linestretch)$
\setstretch{$linestretch$}
$endif$
$if(has-frontmatter)$
\mainmatter
$endif$
$body$ $body$
$if(has-frontmatter)$
\backmatter
$endif$
$if(natbib)$ $if(natbib)$
$if(bibliography)$ $if(bibliography)$
$if(biblio-title)$ $if(biblio-title)$
$if(book-class)$ $if(has-chapters)$
\renewcommand\bibname{$biblio-title$} \renewcommand\bibname{$biblio-title$}
$else$ $else$
\renewcommand\refname{$biblio-title$} \renewcommand\refname{$biblio-title$}
$endif$ $endif$
$endif$ $endif$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} $if(beamer)$
\begin{frame}[allowframebreaks]{$biblio-title$}
\bibliographytrue
$endif$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$if(beamer)$
\end{frame}
$endif$