git.iko.soy/typeable/pandoc
on 1.6 help sign in
typeable/pandoc/templates/latex.template
106 lines 2.4 kB history raw
1$if(legacy-header)$
2$legacy-header$
3$else$
4\documentclass{article}
5\usepackage{amssymb,amsmath}
6$if(xetex)$
7\usepackage{ifxetex}
8\ifxetex
9 \usepackage{fontspec,xltxtra,xunicode}
10 \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
11\else
12 \usepackage[mathletters]{ucs}
13 \usepackage[utf8x]{inputenc}
14\fi
15$else$
16\usepackage[mathletters]{ucs}
17\usepackage[utf8x]{inputenc}
18$endif$
19$if(lhs)$
20\usepackage{listings}
21\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
22$endif$
23$endif$
24$if(verbatim-in-note)$
25\usepackage{fancyvrb}
26$endif$
27$if(fancy-enums)$
28% Redefine labelwidth for lists; otherwise, the enumerate package will cause
29% markers to extend beyond the left margin.
30\makeatletter\AtBeginDocument{%
31 \renewcommand{\@listi}
32 {\setlength{\labelwidth}{4em}}
33}\makeatother
34\usepackage{enumerate}
35$endif$
36$if(tables)$
37\usepackage{array}
38% This is needed because raggedright in table elements redefines \\:
39\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
40\let\PBS=\PreserveBackslash
41$endif$
42$if(strikeout)$
43\usepackage[normalem]{ulem}
44$endif$
45$if(subscript)$
46\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
47$endif$
48$if(url)$
49\usepackage{url}
50$endif$
51$if(graphics)$
52\usepackage{graphicx}
53% We will generate all images so they have a width \maxwidth. This means
54% that they will get their normal width if they fit onto the page, but
55% are scaled down if they would overflow the margins.
56\makeatletter
57\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
58\else\Gin@nat@width\fi}
59\makeatother
60\let\Oldincludegraphics\includegraphics
61\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
62$endif$
63\usepackage[breaklinks=true,unicode=true]{hyperref}
64\setlength{\parindent}{0pt}
65\setlength{\parskip}{6pt plus 2pt minus 1pt}
66$if(numbersections)$
67$else$
68\setcounter{secnumdepth}{0}
69$endif$
70$if(verbatim-in-note)$
71\VerbatimFootnotes % allows verbatim text in footnotes
72$endif$
73$for(header-includes)$
74$header-includes$
75$endfor$
77$if(title)$
78\title{$title$}
79$endif$
80$if(author)$
81\author{$for(author)$$author$$sep$\\$endfor$}
82$endif$
83$if(date)$
84\date{$date$}
85$endif$
87\begin{document}
88$if(title)$
89\maketitle
90$endif$
92$for(include-before)$
93$include-before$
95$endfor$
96$if(toc)$
97\tableofcontents
99$endif$
100$body$
101$for(include-after)$
103$include-after$
104$endfor$
106\end{document}