diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-27 09:29:34 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-27 09:29:34 -0800 |
commit | ac3dc50580d7185d18dd4916782904fd733b3bfd (patch) | |
tree | 23ec8e7c0c0806fde9a07a1b1d271b814343daf8 /default.latex | |
parent | e7d5d8957c77e125b8a1c7eb51356542633d0796 (diff) | |
download | pandoc-templates-ac3dc50580d7185d18dd4916782904fd733b3bfd.tar.gz pandoc-templates-ac3dc50580d7185d18dd4916782904fd733b3bfd.zip |
Initial commit, 2.0.5
Diffstat (limited to 'default.latex')
-rw-r--r-- | default.latex | 403 |
1 files changed, 403 insertions, 0 deletions
diff --git a/default.latex b/default.latex new file mode 100644 index 0000000..a9191aa --- /dev/null +++ b/default.latex | |||
@@ -0,0 +1,403 @@ | |||
1 | \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere | ||
2 | \PassOptionsToPackage{hyphens}{url} | ||
3 | $if(colorlinks)$ | ||
4 | \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} | ||
5 | $endif$ | ||
6 | % | ||
7 | \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$} | ||
8 | $if(beamer)$ | ||
9 | \setbeamertemplate{caption}[numbered] | ||
10 | \setbeamertemplate{caption label separator}{: } | ||
11 | \setbeamercolor{caption name}{fg=normal text.fg} | ||
12 | \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ | ||
13 | $endif$ | ||
14 | $if(beamerarticle)$ | ||
15 | \usepackage{beamerarticle} % needs to be loaded first | ||
16 | $endif$ | ||
17 | $if(fontfamily)$ | ||
18 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} | ||
19 | $else$ | ||
20 | \usepackage{lmodern} | ||
21 | $endif$ | ||
22 | $if(linestretch)$ | ||
23 | \usepackage{setspace} | ||
24 | \setstretch{$linestretch$} | ||
25 | $endif$ | ||
26 | \usepackage{amssymb,amsmath} | ||
27 | \usepackage{ifxetex,ifluatex} | ||
28 | \usepackage{fixltx2e} % provides \textsubscript | ||
29 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex | ||
30 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} | ||
31 | \usepackage[utf8]{inputenc} | ||
32 | \usepackage{textcomp} % provides euro and other symbols | ||
33 | \else % if luatex or xelatex | ||
34 | $if(mathspec)$ | ||
35 | \ifxetex | ||
36 | \usepackage{mathspec} | ||
37 | \else | ||
38 | \usepackage{unicode-math} | ||
39 | \fi | ||
40 | $else$ | ||
41 | \usepackage{unicode-math} | ||
42 | $endif$ | ||
43 | \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} | ||
44 | $for(fontfamilies)$ | ||
45 | \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} | ||
46 | $endfor$ | ||
47 | $if(mainfont)$ | ||
48 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} | ||
49 | $endif$ | ||
50 | $if(sansfont)$ | ||
51 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} | ||
52 | $endif$ | ||
53 | $if(monofont)$ | ||
54 | \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} | ||
55 | $endif$ | ||
56 | $if(mathfont)$ | ||
57 | $if(mathspec)$ | ||
58 | \ifxetex | ||
59 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
60 | \else | ||
61 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
62 | \fi | ||
63 | $else$ | ||
64 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
65 | $endif$ | ||
66 | $endif$ | ||
67 | $if(CJKmainfont)$ | ||
68 | \ifxetex | ||
69 | \usepackage{xeCJK} | ||
70 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} | ||
71 | \fi | ||
72 | $endif$ | ||
73 | $if(luatexjapresetoptions)$ | ||
74 | \ifluatex | ||
75 | \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} | ||
76 | \fi | ||
77 | $endif$ | ||
78 | $if(CJKmainfont)$ | ||
79 | \ifluatex | ||
80 | \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} | ||
81 | \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} | ||
82 | \fi | ||
83 | $endif$ | ||
84 | \fi | ||
85 | $if(beamer)$ | ||
86 | $if(theme)$ | ||
87 | \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} | ||
88 | $endif$ | ||
89 | $if(colortheme)$ | ||
90 | \usecolortheme{$colortheme$} | ||
91 | $endif$ | ||
92 | $if(fonttheme)$ | ||
93 | \usefonttheme{$fonttheme$} | ||
94 | $endif$ | ||
95 | $if(mainfont)$ | ||
96 | \usefonttheme{serif} % use mainfont rather than sansfont for slide text | ||
97 | $endif$ | ||
98 | $if(innertheme)$ | ||
99 | \useinnertheme{$innertheme$} | ||
100 | $endif$ | ||
101 | $if(outertheme)$ | ||
102 | \useoutertheme{$outertheme$} | ||
103 | $endif$ | ||
104 | $endif$ | ||
105 | % use upquote if available, for straight quotes in verbatim environments | ||
106 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} | ||
107 | % use microtype if available | ||
108 | \IfFileExists{microtype.sty}{% | ||
109 | \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} | ||
110 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts | ||
111 | }{} | ||
112 | $if(indent)$ | ||
113 | $else$ | ||
114 | \IfFileExists{parskip.sty}{% | ||
115 | \usepackage{parskip} | ||
116 | }{% else | ||
117 | \setlength{\parindent}{0pt} | ||
118 | \setlength{\parskip}{6pt plus 2pt minus 1pt} | ||
119 | } | ||
120 | $endif$ | ||
121 | $if(verbatim-in-note)$ | ||
122 | \usepackage{fancyvrb} | ||
123 | $endif$ | ||
124 | $if(colorlinks)$ | ||
125 | \usepackage{xcolor} | ||
126 | $endif$ | ||
127 | \usepackage{hyperref} | ||
128 | \hypersetup{ | ||
129 | $if(title-meta)$ | ||
130 | pdftitle={$title-meta$}, | ||
131 | $endif$ | ||
132 | $if(author-meta)$ | ||
133 | pdfauthor={$author-meta$}, | ||
134 | $endif$ | ||
135 | $if(keywords)$ | ||
136 | pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, | ||
137 | $endif$ | ||
138 | $if(colorlinks)$ | ||
139 | colorlinks=true, | ||
140 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, | ||
141 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, | ||
142 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, | ||
143 | $else$ | ||
144 | pdfborder={0 0 0}, | ||
145 | $endif$ | ||
146 | breaklinks=true} | ||
147 | \urlstyle{same} % don't use monospace font for urls | ||
148 | $if(verbatim-in-note)$ | ||
149 | \VerbatimFootnotes % allows verbatim text in footnotes | ||
150 | $endif$ | ||
151 | $if(geometry)$ | ||
152 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} | ||
153 | $endif$ | ||
154 | $if(beamer)$ | ||
155 | \newif\ifbibliography | ||
156 | $endif$ | ||
157 | $if(listings)$ | ||
158 | \usepackage{listings} | ||
159 | \newcommand{\passthrough}[1]{#1} | ||
160 | $endif$ | ||
161 | $if(lhs)$ | ||
162 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} | ||
163 | $endif$ | ||
164 | $if(highlighting-macros)$ | ||
165 | $highlighting-macros$ | ||
166 | $endif$ | ||
167 | $if(tables)$ | ||
168 | \usepackage{longtable,booktabs} | ||
169 | $if(beamer)$ | ||
170 | \usepackage{caption} | ||
171 | % These lines are needed to make table captions work with longtable: | ||
172 | \makeatletter | ||
173 | \def\fnum@table{\tablename~\thetable} | ||
174 | \makeatother | ||
175 | $else$ | ||
176 | % Fix footnotes in tables (requires footnote package) | ||
177 | \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{} | ||
178 | $endif$ | ||
179 | $endif$ | ||
180 | $if(graphics)$ | ||
181 | \usepackage{graphicx,grffile} | ||
182 | \makeatletter | ||
183 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} | ||
184 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} | ||
185 | \makeatother | ||
186 | % Scale images if necessary, so that they will not overflow the page | ||
187 | % margins by default, and it is still possible to overwrite the defaults | ||
188 | % using explicit options in \includegraphics[width, height, ...]{} | ||
189 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} | ||
190 | $endif$ | ||
191 | $if(beamer)$ | ||
192 | % Prevent slide breaks in the middle of a paragraph: | ||
193 | \widowpenalties 1 10000 | ||
194 | \raggedbottom | ||
195 | $if(section-titles)$ | ||
196 | \AtBeginPart{ | ||
197 | \let\insertpartnumber\relax | ||
198 | \let\partname\relax | ||
199 | \frame{\partpage} | ||
200 | } | ||
201 | \AtBeginSection{ | ||
202 | \ifbibliography | ||
203 | \else | ||
204 | \let\insertsectionnumber\relax | ||
205 | \let\sectionname\relax | ||
206 | \frame{\sectionpage} | ||
207 | \fi | ||
208 | } | ||
209 | \AtBeginSubsection{ | ||
210 | \let\insertsubsectionnumber\relax | ||
211 | \let\subsectionname\relax | ||
212 | \frame{\subsectionpage} | ||
213 | } | ||
214 | $endif$ | ||
215 | $endif$ | ||
216 | $if(links-as-notes)$ | ||
217 | % Make links footnotes instead of hotlinks: | ||
218 | \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} | ||
219 | $endif$ | ||
220 | $if(strikeout)$ | ||
221 | \usepackage[normalem]{ulem} | ||
222 | % avoid problems with \sout in headers with hyperref: | ||
223 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} | ||
224 | $endif$ | ||
225 | \setlength{\emergencystretch}{3em} % prevent overfull lines | ||
226 | \providecommand{\tightlist}{% | ||
227 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} | ||
228 | $if(numbersections)$ | ||
229 | \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} | ||
230 | $else$ | ||
231 | \setcounter{secnumdepth}{0} | ||
232 | $endif$ | ||
233 | $if(beamer)$ | ||
234 | $else$ | ||
235 | $if(subparagraph)$ | ||
236 | $else$ | ||
237 | % Redefines (sub)paragraphs to behave more like sections | ||
238 | \ifx\paragraph\undefined\else | ||
239 | \let\oldparagraph\paragraph | ||
240 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} | ||
241 | \fi | ||
242 | \ifx\subparagraph\undefined\else | ||
243 | \let\oldsubparagraph\subparagraph | ||
244 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} | ||
245 | \fi | ||
246 | $endif$ | ||
247 | $endif$ | ||
248 | $if(pagestyle)$ | ||
249 | \pagestyle{$pagestyle$} | ||
250 | $endif$ | ||
251 | |||
252 | % set default figure placement to htbp | ||
253 | \makeatletter | ||
254 | \def\fps@figure{htbp} | ||
255 | \makeatother | ||
256 | |||
257 | $for(header-includes)$ | ||
258 | $header-includes$ | ||
259 | $endfor$ | ||
260 | $if(lang)$ | ||
261 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex | ||
262 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} | ||
263 | $if(babel-newcommands)$ | ||
264 | $babel-newcommands$ | ||
265 | $endif$ | ||
266 | \else | ||
267 | % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) | ||
268 | \usepackage{polyglossia} | ||
269 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} | ||
270 | $for(polyglossia-otherlangs)$ | ||
271 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} | ||
272 | $endfor$ | ||
273 | \fi | ||
274 | $endif$ | ||
275 | $if(dir)$ | ||
276 | \ifxetex | ||
277 | % load bidi as late as possible as it modifies e.g. graphicx | ||
278 | $if(latex-dir-rtl)$ | ||
279 | \usepackage[RTLdocument]{bidi} | ||
280 | $else$ | ||
281 | \usepackage{bidi} | ||
282 | $endif$ | ||
283 | \fi | ||
284 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex | ||
285 | \TeXXeTstate=1 | ||
286 | \newcommand{\RL}[1]{\beginR #1\endR} | ||
287 | \newcommand{\LR}[1]{\beginL #1\endL} | ||
288 | \newenvironment{RTL}{\beginR}{\endR} | ||
289 | \newenvironment{LTR}{\beginL}{\endL} | ||
290 | \fi | ||
291 | $endif$ | ||
292 | $if(natbib)$ | ||
293 | \usepackage[$natbiboptions$]{natbib} | ||
294 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} | ||
295 | $endif$ | ||
296 | $if(biblatex)$ | ||
297 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} | ||
298 | $for(bibliography)$ | ||
299 | \addbibresource{$bibliography$} | ||
300 | $endfor$ | ||
301 | $endif$ | ||
302 | |||
303 | $if(title)$ | ||
304 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} | ||
305 | $endif$ | ||
306 | $if(subtitle)$ | ||
307 | \providecommand{\subtitle}[1]{} | ||
308 | \subtitle{$subtitle$} | ||
309 | $endif$ | ||
310 | $if(author)$ | ||
311 | \author{$for(author)$$author$$sep$ \and $endfor$} | ||
312 | $endif$ | ||
313 | $if(institute)$ | ||
314 | \providecommand{\institute}[1]{} | ||
315 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} | ||
316 | $endif$ | ||
317 | \date{$date$} | ||
318 | $if(beamer)$ | ||
319 | $if(titlegraphic)$ | ||
320 | \titlegraphic{\includegraphics{$titlegraphic$}} | ||
321 | $endif$ | ||
322 | $if(logo)$ | ||
323 | \logo{\includegraphics{$logo$}} | ||
324 | $endif$ | ||
325 | $endif$ | ||
326 | |||
327 | \begin{document} | ||
328 | $if(title)$ | ||
329 | $if(beamer)$ | ||
330 | \frame{\titlepage} | ||
331 | $else$ | ||
332 | \maketitle | ||
333 | $endif$ | ||
334 | $if(abstract)$ | ||
335 | \begin{abstract} | ||
336 | $abstract$ | ||
337 | \end{abstract} | ||
338 | $endif$ | ||
339 | $endif$ | ||
340 | |||
341 | $for(include-before)$ | ||
342 | $include-before$ | ||
343 | |||
344 | $endfor$ | ||
345 | $if(toc)$ | ||
346 | $if(beamer)$ | ||
347 | \begin{frame} | ||
348 | \tableofcontents[hideallsubsections] | ||
349 | \end{frame} | ||
350 | $else$ | ||
351 | { | ||
352 | $if(colorlinks)$ | ||
353 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} | ||
354 | $endif$ | ||
355 | \setcounter{tocdepth}{$toc-depth$} | ||
356 | \tableofcontents | ||
357 | } | ||
358 | $endif$ | ||
359 | $endif$ | ||
360 | $if(lot)$ | ||
361 | \listoftables | ||
362 | $endif$ | ||
363 | $if(lof)$ | ||
364 | \listoffigures | ||
365 | $endif$ | ||
366 | $body$ | ||
367 | |||
368 | $if(natbib)$ | ||
369 | $if(bibliography)$ | ||
370 | $if(biblio-title)$ | ||
371 | $if(book-class)$ | ||
372 | \renewcommand\bibname{$biblio-title$} | ||
373 | $else$ | ||
374 | \renewcommand\refname{$biblio-title$} | ||
375 | $endif$ | ||
376 | $endif$ | ||
377 | $if(beamer)$ | ||
378 | \begin{frame}[allowframebreaks]{$biblio-title$} | ||
379 | \bibliographytrue | ||
380 | $endif$ | ||
381 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} | ||
382 | $if(beamer)$ | ||
383 | \end{frame} | ||
384 | $endif$ | ||
385 | |||
386 | $endif$ | ||
387 | $endif$ | ||
388 | $if(biblatex)$ | ||
389 | $if(beamer)$ | ||
390 | \begin{frame}[allowframebreaks]{$biblio-title$} | ||
391 | \bibliographytrue | ||
392 | \printbibliography[heading=none] | ||
393 | \end{frame} | ||
394 | $else$ | ||
395 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ | ||
396 | $endif$ | ||
397 | |||
398 | $endif$ | ||
399 | $for(include-after)$ | ||
400 | $include-after$ | ||
401 | |||
402 | $endfor$ | ||
403 | \end{document} | ||