2012-03-04 18:42:42 -08:00
|
|
|
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$]{$documentclass$}
|
2011-07-19 12:02:59 -07:00
|
|
|
\usepackage{amssymb,amsmath}
|
2011-07-30 17:03:03 -07:00
|
|
|
\usepackage{ifxetex,ifluatex}
|
2012-04-21 09:57:45 -07:00
|
|
|
\usepackage{fixltx2e} % provides \textsubscript
|
2012-03-14 18:49:48 -07:00
|
|
|
\ifxetex
|
|
|
|
\usepackage{fontspec,xltxtra,xunicode}
|
2011-07-19 12:02:59 -07:00
|
|
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
2012-03-04 18:52:20 -08:00
|
|
|
\newcommand{\euro}{€}
|
2012-03-15 10:47:19 -07:00
|
|
|
$if(mainfont)$
|
|
|
|
\setmainfont{$mainfont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
|
|
|
$if(sansfont)$
|
2012-03-14 14:40:47 -07:00
|
|
|
\setsansfont{$sansfont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
|
|
|
$if(monofont)$
|
2012-03-14 14:40:47 -07:00
|
|
|
\setmonofont{$monofont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
2012-03-15 14:38:21 -07:00
|
|
|
$if(mathfont)$
|
|
|
|
\setmathfont{$mathfont$}
|
|
|
|
$endif$
|
2011-07-19 12:02:59 -07:00
|
|
|
\else
|
2011-07-29 23:48:36 -07:00
|
|
|
\ifluatex
|
2011-07-22 12:50:31 -07:00
|
|
|
\usepackage{fontspec}
|
2012-03-14 18:49:48 -07:00
|
|
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
|
|
|
\newcommand{\euro}{€}
|
2012-03-15 10:47:19 -07:00
|
|
|
$if(mainfont)$
|
|
|
|
\setmainfont{$mainfont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
|
|
|
$if(sansfont)$
|
2012-03-14 18:49:48 -07:00
|
|
|
\setsansfont{$sansfont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
|
|
|
$if(monofont)$
|
2012-03-14 18:49:48 -07:00
|
|
|
\setmonofont{$monofont$}
|
2012-03-15 14:38:21 -07:00
|
|
|
$endif$
|
|
|
|
$if(mathfont)$
|
|
|
|
\setmathfont{$mathfont$}
|
2012-03-14 19:06:17 -07:00
|
|
|
$endif$
|
2011-07-22 12:50:31 -07:00
|
|
|
\else
|
2011-07-23 10:04:47 -07:00
|
|
|
\usepackage[utf8]{inputenc}
|
2012-04-03 18:48:42 -07:00
|
|
|
$if(euro)$
|
2012-03-04 18:52:20 -08:00
|
|
|
\usepackage{eurosym}
|
2012-04-03 18:48:42 -07:00
|
|
|
$endif$
|
2011-07-22 12:50:31 -07:00
|
|
|
\fi
|
2011-07-19 12:02:59 -07:00
|
|
|
\fi
|
2012-03-14 14:16:33 -07:00
|
|
|
$if(geometry)$
|
2012-03-15 10:47:19 -07:00
|
|
|
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
|
2012-03-14 14:16:33 -07:00
|
|
|
$endif$
|
2011-07-19 12:02:59 -07:00
|
|
|
$if(natbib)$
|
|
|
|
\usepackage{natbib}
|
|
|
|
\bibliographystyle{plainnat}
|
|
|
|
$endif$
|
|
|
|
$if(biblatex)$
|
|
|
|
\usepackage{biblatex}
|
|
|
|
$if(biblio-files)$
|
|
|
|
\bibliography{$biblio-files$}
|
|
|
|
$endif$
|
|
|
|
$endif$
|
2011-12-23 18:23:48 -08:00
|
|
|
$if(listings)$
|
2011-07-19 12:02:59 -07:00
|
|
|
\usepackage{listings}
|
2011-12-23 18:23:48 -08:00
|
|
|
$endif$
|
|
|
|
$if(lhs)$
|
2011-07-19 12:02:59 -07:00
|
|
|
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
|
|
|
$endif$
|
2011-12-23 17:46:53 -08:00
|
|
|
$if(highlighting-macros)$
|
|
|
|
$highlighting-macros$
|
|
|
|
$endif$
|
2011-07-19 12:02:59 -07:00
|
|
|
$if(verbatim-in-note)$
|
|
|
|
\usepackage{fancyvrb}
|
|
|
|
$endif$
|
|
|
|
$if(fancy-enums)$
|
|
|
|
% Redefine labelwidth for lists; otherwise, the enumerate package will cause
|
|
|
|
% markers to extend beyond the left margin.
|
|
|
|
\makeatletter\AtBeginDocument{%
|
|
|
|
\renewcommand{\@listi}
|
|
|
|
{\setlength{\labelwidth}{4em}}
|
|
|
|
}\makeatother
|
|
|
|
\usepackage{enumerate}
|
|
|
|
$endif$
|
|
|
|
$if(tables)$
|
|
|
|
\usepackage{ctable}
|
|
|
|
\usepackage{float} % provides the H option for float placement
|
|
|
|
$endif$
|
|
|
|
$if(url)$
|
|
|
|
\usepackage{url}
|
|
|
|
$endif$
|
|
|
|
$if(graphics)$
|
|
|
|
\usepackage{graphicx}
|
|
|
|
% We will generate all images so they have a width \maxwidth. This means
|
|
|
|
% that they will get their normal width if they fit onto the page, but
|
|
|
|
% are scaled down if they would overflow the margins.
|
|
|
|
\makeatletter
|
|
|
|
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
|
|
|
|
\else\Gin@nat@width\fi}
|
|
|
|
\makeatother
|
|
|
|
\let\Oldincludegraphics\includegraphics
|
|
|
|
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
|
|
|
|
$endif$
|
2011-07-29 23:48:36 -07:00
|
|
|
\ifxetex
|
2011-07-23 09:54:18 -07:00
|
|
|
\usepackage[setpagesize=false, % page size defined by xetex
|
|
|
|
unicode=false, % unicode breaks when used with xetex
|
2011-12-30 14:29:37 -08:00
|
|
|
xetex,
|
2012-03-25 12:03:24 -07:00
|
|
|
bookmarks=true,
|
|
|
|
pdfauthor={$author-meta$},
|
|
|
|
pdftitle={$title-meta$},
|
2011-12-30 14:29:37 -08:00
|
|
|
colorlinks=true,
|
|
|
|
linkcolor=blue]{hyperref}
|
2011-07-23 09:54:18 -07:00
|
|
|
\else
|
2011-12-30 14:29:37 -08:00
|
|
|
\usepackage[unicode=true,
|
2012-03-25 12:03:24 -07:00
|
|
|
bookmarks=true,
|
|
|
|
pdfauthor={$author-meta$},
|
|
|
|
pdftitle={$title-meta$},
|
2011-12-30 14:29:37 -08:00
|
|
|
colorlinks=true,
|
|
|
|
linkcolor=blue]{hyperref}
|
2011-07-23 09:54:18 -07:00
|
|
|
\fi
|
|
|
|
\hypersetup{breaklinks=true, pdfborder={0 0 0}}
|
2011-07-23 09:43:38 -07:00
|
|
|
$if(strikeout)$
|
|
|
|
\usepackage[normalem]{ulem}
|
|
|
|
% avoid problems with \sout in headers with hyperref:
|
|
|
|
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
|
|
|
|
$endif$
|
2011-07-19 12:02:59 -07:00
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
2011-07-22 12:50:22 -07:00
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
2011-07-19 12:02:59 -07:00
|
|
|
$if(numbersections)$
|
|
|
|
$else$
|
|
|
|
\setcounter{secnumdepth}{0}
|
|
|
|
$endif$
|
|
|
|
$if(verbatim-in-note)$
|
|
|
|
\VerbatimFootnotes % allows verbatim text in footnotes
|
|
|
|
$endif$
|
2011-11-27 20:36:37 -08:00
|
|
|
$if(lang)$
|
2012-03-04 18:42:42 -08:00
|
|
|
\ifxetex
|
|
|
|
\usepackage{polyglossia}
|
2012-03-05 08:37:04 -08:00
|
|
|
\setmainlanguage{$mainlang$}
|
2012-03-04 18:42:42 -08:00
|
|
|
\else
|
|
|
|
\usepackage[$lang$]{babel}
|
|
|
|
\fi
|
2011-11-27 20:36:37 -08:00
|
|
|
$endif$
|
2011-07-19 12:02:59 -07:00
|
|
|
$for(header-includes)$
|
|
|
|
$header-includes$
|
|
|
|
$endfor$
|
|
|
|
|
|
|
|
$if(title)$
|
|
|
|
\title{$title$}
|
|
|
|
$endif$
|
|
|
|
$if(author)$
|
2011-07-21 10:10:51 -07:00
|
|
|
\author{$for(author)$$author$$sep$ \and $endfor$}
|
2011-07-19 12:02:59 -07:00
|
|
|
$endif$
|
|
|
|
$if(date)$
|
|
|
|
\date{$date$}
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
$if(title)$
|
|
|
|
\maketitle
|
|
|
|
$endif$
|
|
|
|
|
|
|
|
$for(include-before)$
|
|
|
|
$include-before$
|
|
|
|
|
|
|
|
$endfor$
|
|
|
|
$if(toc)$
|
|
|
|
\tableofcontents
|
|
|
|
|
|
|
|
$endif$
|
|
|
|
$body$
|
2011-07-30 17:03:03 -07:00
|
|
|
|
2011-07-19 12:02:59 -07:00
|
|
|
$if(natbib)$
|
2011-07-30 17:03:03 -07:00
|
|
|
$if(biblio-files)$
|
2011-07-19 12:02:59 -07:00
|
|
|
$if(biblio-title)$
|
|
|
|
$if(book-class)$
|
|
|
|
\renewcommand\bibname{$biblio-title$}
|
|
|
|
$else$
|
|
|
|
\renewcommand\refname{$biblio-title$}
|
|
|
|
$endif$
|
|
|
|
$endif$
|
|
|
|
\bibliography{$biblio-files$}
|
2011-07-30 17:03:03 -07:00
|
|
|
|
2011-07-19 12:02:59 -07:00
|
|
|
$endif$
|
|
|
|
$endif$
|
|
|
|
$if(biblatex)$
|
|
|
|
\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
|
2011-07-30 17:03:03 -07:00
|
|
|
|
2011-07-19 12:02:59 -07:00
|
|
|
$endif$
|
|
|
|
$for(include-after)$
|
|
|
|
$include-after$
|
|
|
|
|
2011-07-30 17:03:03 -07:00
|
|
|
$endfor$
|
2011-07-19 12:02:59 -07:00
|
|
|
\end{document}
|