1 \documentclass[$if(fontsize)$$fontsize$,$endif$
2 $if(lang)$$lang$,$endif$
]{scrartcl
}
4 \usepackage{ifxetex,ifluatex
}
5 \usepackage[T1]{fontenc}
6 \usepackage[utf8
]{inputenc}
10 \setkomafont{sectioning
}{\normalfont\bfseries}
11 \setkomafont{descriptionlabel
}{\normalfont}
12 \setkomafont{caption
}{\normalfont\small}
14 $if(highlighting-macros)$
18 $if(verbatim-in-note)$
23 % Redefine labelwidth for lists; otherwise, the enumerate package will cause
24 % markers to extend beyond the left margin.
28 \renewcommand{\@listi
}
29 {\setlength{\labelwidth}{4em
}}%
34 \usepackage{enumerate
}
39 \usepackage{float
} % provides the H option for float placement
41 % pandoc uses \medskip between table rows which looks ugly
43 doinside=
{\let\medskip\relax}}
53 % We will generate all images so they have a width 0.6\maxwidth. This means
54 % that they will get their normal width if they fit onto the page, but are
55 % scaled down if they would overflow this limit.
59 \ifdim\Gin@nat@width>
\linewidth
67 \let\Oldincludegraphics\includegraphics
68 \renewcommand{\includegraphics}[1]{%
69 \Oldincludegraphics[width=
0.6\maxwidth]{#1}}
73 \usepackage[setpagesize=false,
% page size defined by xetex
74 unicode=false,
% unicode breaks when used with xetex
77 linkcolor=blue
]{hyperref
}
79 \usepackage[unicode=true,
81 linkcolor=blue
]{hyperref
}
83 \hypersetup{breaklinks=true, pdfborder=
{0 0 0}}
85 % We want the names `section 2', `subsection 4.1', and the like in local
86 % links, omitting the original link text. To do that, we redefine \href.
89 \let\original@href
\href
91 % Here is the new \href wrapper. We check whether the first token is \#.
92 % If yes, we call \autoref, otherwise the original \href macro. \@nil is a
93 % delimiter token which we need, because we call the arguments in
94 % \modified@href without braces so that we can split off the first token.
96 \modified@href
#1\@nil
}
98 % Using \expandafter makes TeX finish the \if clause before one of the
99 % \almost@xxx macros picks up the arguments.
100 \def\modified@href
#1#2\@nil
{%
102 \expandafter\almost@autoref
104 \expandafter\almost@original@href
108 % We normalize \_ in the reference (argument #2), which we put into
109 % parentheses after the label (argument #3). Argument #1 holds \# which we
111 \def\almost@autoref
#1#2#3{%
112 #3 (
\hyper@normalise
\autoref{#2})
}
114 % For a non-local link, unify the split off first character with the
115 % remaining part of the link.
116 \def\almost@original@href
#1#2{%
117 \original@href
{#1#2}}
122 \newcommand{\textsubscr}[1]{%
123 \ensuremath{_
{\scriptsize\textrm{#1}}}}
126 \setlength{\parindent}{0pt
}
127 \setlength{\parskip}{6pt plus
2pt minus
1pt
}
128 \setlength{\emergencystretch}{3em
} % prevent overfull lines
130 % We want a break after the description label. Alas, it is necessary to
131 % copy the whole definition of \@item and the `description' environemnt just
135 \let\original@item\@item
136 \def\description@item
[#1]{%
150 \addpenalty\@beginparpenalty
152 \addvspace{-
\parskip}%
155 \addpenalty\@itempenalty
162 \global\@newlistfalse
164 \global\@inlabelfalse
176 \clubpenalty \@clubpenalty
182 \refstepcounter\@listctr
185 \sbox\@tempboxa
{\makelabel{#1}}%
186 \global\setbox\@labels
\hbox{%
191 \ifdim \wd\@tempboxa >
\labelwidth
194 \hbox to
\labelwidth {\unhbox\@tempboxa
}%
199 \renewenvironment{description
}{%
200 \list{}{\labelwidth\z@
\itemindent-
\leftmargin
201 \let\makelabel\descriptionlabel
202 \let\@item
\description@item
}%
204 \let\@item
\original@item
210 % we want block quotes formatted as italic
211 \renewenvironment{quote
}{%
212 \list{}{\rightmargin\leftmargin}%
223 \setcounter{secnumdepth
}{0}
226 $if(verbatim-in-note)$
227 \VerbatimFootnotes % allows verbatim text in footnotes
232 \usepackage{polyglossia
}
233 \setmainlanguage{$mainlang$
}
235 \usepackage[$lang$
]{babel
}
239 $for(header-includes)$
246 \author{$for(author)$$author$$sep$
\and $endfor$
}
248 \date{Version $version$
}
256 $for(include-before)$