diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-28 22:06:39 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-28 22:06:39 -0700 |
commit | 614de9963564f1201c52ae586122b30ee58c330e (patch) | |
tree | 9763b02bb863ee166044b51aba1355728f4c39e6 /default.latex | |
parent | 24030660f1d17272cadfa62497be182996e2fbe2 (diff) | |
download | pandoc-templates-614de9963564f1201c52ae586122b30ee58c330e.tar.gz pandoc-templates-614de9963564f1201c52ae586122b30ee58c330e.zip |
Updated templates for pandoc 2.14
Diffstat (limited to 'default.latex')
-rw-r--r-- | default.latex | 132 |
1 files changed, 77 insertions, 55 deletions
diff --git a/default.latex b/default.latex index 830bf80..60f9972 100644 --- a/default.latex +++ b/default.latex | |||
@@ -2,7 +2,7 @@ | |||
2 | \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} | 2 | \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} |
3 | \PassOptionsToPackage{hyphens}{url} | 3 | \PassOptionsToPackage{hyphens}{url} |
4 | $if(colorlinks)$ | 4 | $if(colorlinks)$ |
5 | \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} | 5 | \PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} |
6 | $endif$ | 6 | $endif$ |
7 | $if(dir)$ | 7 | $if(dir)$ |
8 | $if(latex-dir-rtl)$ | 8 | $if(latex-dir-rtl)$ |
@@ -36,6 +36,35 @@ $for(classoption)$ | |||
36 | $classoption$$sep$, | 36 | $classoption$$sep$, |
37 | $endfor$ | 37 | $endfor$ |
38 | ]{$documentclass$} | 38 | ]{$documentclass$} |
39 | $if(title)$ | ||
40 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} | ||
41 | $endif$ | ||
42 | $if(subtitle)$ | ||
43 | $if(beamer)$ | ||
44 | $else$ | ||
45 | \usepackage{etoolbox} | ||
46 | \makeatletter | ||
47 | \providecommand{\subtitle}[1]{% add subtitle to \maketitle | ||
48 | \apptocmd{\@title}{\par {\large #1 \par}}{}{} | ||
49 | } | ||
50 | \makeatother | ||
51 | $endif$ | ||
52 | \subtitle{$subtitle$} | ||
53 | $endif$ | ||
54 | \author{$for(author)$$author$$sep$ \and $endfor$} | ||
55 | \date{$date$} | ||
56 | $if(beamer)$ | ||
57 | $if(institute)$ | ||
58 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} | ||
59 | $endif$ | ||
60 | $if(titlegraphic)$ | ||
61 | \titlegraphic{\includegraphics{$titlegraphic$}} | ||
62 | $endif$ | ||
63 | $if(logo)$ | ||
64 | \logo{\includegraphics{$logo$}} | ||
65 | $endif$ | ||
66 | $endif$ | ||
67 | |||
39 | $if(beamer)$ | 68 | $if(beamer)$ |
40 | $if(background-image)$ | 69 | $if(background-image)$ |
41 | \usebackgroundtemplate{% | 70 | \usebackgroundtemplate{% |
@@ -156,6 +185,25 @@ $if(CJKmainfont)$ | |||
156 | \fi | 185 | \fi |
157 | $endif$ | 186 | $endif$ |
158 | \fi | 187 | \fi |
188 | $if(zero-width-non-joiner)$ | ||
189 | %% Support for zero-width non-joiner characters. | ||
190 | \makeatletter | ||
191 | \def\zerowidthnonjoiner{% | ||
192 | % Prevent ligatures and adjust kerning, but still support hyphenating. | ||
193 | \texorpdfstring{% | ||
194 | \textormath{\nobreak\discretionary{-}{}{\kern.03em}% | ||
195 | \ifvmode\else\nobreak\hskip\z@skip\fi}{}% | ||
196 | }{}% | ||
197 | } | ||
198 | \makeatother | ||
199 | \ifPDFTeX | ||
200 | \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} | ||
201 | \else | ||
202 | \catcode`^^^^200c=\active | ||
203 | \protected\def ^^^^200c{\zerowidthnonjoiner} | ||
204 | \fi | ||
205 | %% End of ZWNJ support | ||
206 | $endif$ | ||
159 | $if(beamer)$ | 207 | $if(beamer)$ |
160 | $if(theme)$ | 208 | $if(theme)$ |
161 | \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} | 209 | \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} |
@@ -325,6 +373,31 @@ $endif$ | |||
325 | $if(pagestyle)$ | 373 | $if(pagestyle)$ |
326 | \pagestyle{$pagestyle$} | 374 | \pagestyle{$pagestyle$} |
327 | $endif$ | 375 | $endif$ |
376 | $if(csl-refs)$ | ||
377 | \newlength{\cslhangindent} | ||
378 | \setlength{\cslhangindent}{1.5em} | ||
379 | \newlength{\csllabelwidth} | ||
380 | \setlength{\csllabelwidth}{3em} | ||
381 | \newlength{\cslentryspacingunit} % times entry-spacing | ||
382 | \setlength{\cslentryspacingunit}{\parskip} | ||
383 | \newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing | ||
384 | {% don't indent paragraphs | ||
385 | \setlength{\parindent}{0pt} | ||
386 | % turn on hanging indent if param 1 is 1 | ||
387 | \ifodd #1 | ||
388 | \let\oldpar\par | ||
389 | \def\par{\hangindent=\cslhangindent\oldpar} | ||
390 | \fi | ||
391 | % set entry spacing | ||
392 | \setlength{\parskip}{#2\cslentryspacingunit} | ||
393 | }% | ||
394 | {} | ||
395 | \usepackage{calc} | ||
396 | \newcommand{\CSLBlock}[1]{#1\hfill\break} | ||
397 | \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} | ||
398 | \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} | ||
399 | \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} | ||
400 | $endif$ | ||
328 | $for(header-includes)$ | 401 | $for(header-includes)$ |
329 | $header-includes$ | 402 | $header-includes$ |
330 | $endfor$ | 403 | $endfor$ |
@@ -375,61 +448,10 @@ $endif$ | |||
375 | $if(nocite-ids)$ | 448 | $if(nocite-ids)$ |
376 | \nocite{$for(nocite-ids)$$it$$sep$, $endfor$} | 449 | \nocite{$for(nocite-ids)$$it$$sep$, $endfor$} |
377 | $endif$ | 450 | $endif$ |
378 | $if(csl-refs)$ | ||
379 | \newlength{\cslhangindent} | ||
380 | \setlength{\cslhangindent}{1.5em} | ||
381 | \newlength{\csllabelwidth} | ||
382 | \setlength{\csllabelwidth}{3em} | ||
383 | \newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing | ||
384 | {% don't indent paragraphs | ||
385 | \setlength{\parindent}{0pt} | ||
386 | % turn on hanging indent if param 1 is 1 | ||
387 | \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi | ||
388 | % set entry spacing | ||
389 | \ifnum #2 > 0 | ||
390 | \setlength{\parskip}{#2\baselineskip} | ||
391 | \fi | ||
392 | }% | ||
393 | {} | ||
394 | \usepackage{calc} | ||
395 | \newcommand{\CSLBlock}[1]{#1\hfill\break} | ||
396 | \newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} | ||
397 | \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} | ||
398 | \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} | ||
399 | $endif$ | ||
400 | $if(csquotes)$ | 451 | $if(csquotes)$ |
401 | \usepackage{csquotes} | 452 | \usepackage{csquotes} |
402 | $endif$ | 453 | $endif$ |
403 | 454 | ||
404 | $if(title)$ | ||
405 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} | ||
406 | $endif$ | ||
407 | $if(subtitle)$ | ||
408 | $if(beamer)$ | ||
409 | $else$ | ||
410 | \usepackage{etoolbox} | ||
411 | \makeatletter | ||
412 | \providecommand{\subtitle}[1]{% add subtitle to \maketitle | ||
413 | \apptocmd{\@title}{\par {\large #1 \par}}{}{} | ||
414 | } | ||
415 | \makeatother | ||
416 | $endif$ | ||
417 | \subtitle{$subtitle$} | ||
418 | $endif$ | ||
419 | \author{$for(author)$$author$$sep$ \and $endfor$} | ||
420 | \date{$date$} | ||
421 | $if(beamer)$ | ||
422 | $if(institute)$ | ||
423 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} | ||
424 | $endif$ | ||
425 | $if(titlegraphic)$ | ||
426 | \titlegraphic{\includegraphics{$titlegraphic$}} | ||
427 | $endif$ | ||
428 | $if(logo)$ | ||
429 | \logo{\includegraphics{$logo$}} | ||
430 | $endif$ | ||
431 | $endif$ | ||
432 | |||
433 | \begin{document} | 455 | \begin{document} |
434 | $if(has-frontmatter)$ | 456 | $if(has-frontmatter)$ |
435 | \frontmatter | 457 | \frontmatter |
@@ -472,12 +494,12 @@ $endif$ | |||
472 | } | 494 | } |
473 | $endif$ | 495 | $endif$ |
474 | $endif$ | 496 | $endif$ |
475 | $if(lot)$ | ||
476 | \listoftables | ||
477 | $endif$ | ||
478 | $if(lof)$ | 497 | $if(lof)$ |
479 | \listoffigures | 498 | \listoffigures |
480 | $endif$ | 499 | $endif$ |
500 | $if(lot)$ | ||
501 | \listoftables | ||
502 | $endif$ | ||
481 | $if(linestretch)$ | 503 | $if(linestretch)$ |
482 | \setstretch{$linestretch$} | 504 | \setstretch{$linestretch$} |
483 | $endif$ | 505 | $endif$ |