summaryrefslogtreecommitdiffstats
path: root/beamer/template.latex
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2021-11-04 10:16:14 +0100
committerMinijackson <minijackson@riseup.net>2021-11-04 10:16:14 +0100
commit1649317cb21c7fd30a5147cffdd1b24a6cef258a (patch)
tree5c34ba4d94370a51dacf7b8462d3f82fac9dfc00 /beamer/template.latex
parent77a3ffb7c02b6f21473ab7dd99a0ce7e66bb6645 (diff)
downloadpandoc-nix-templates-1649317cb21c7fd30a5147cffdd1b24a6cef258a.tar.gz
pandoc-nix-templates-1649317cb21c7fd30a5147cffdd1b24a6cef258a.zip
manage template in a dedicated repo
Diffstat (limited to 'beamer/template.latex')
-rw-r--r--beamer/template.latex607
1 files changed, 0 insertions, 607 deletions
diff --git a/beamer/template.latex b/beamer/template.latex
deleted file mode 100644
index 2b8db35..0000000
--- a/beamer/template.latex
+++ /dev/null
@@ -1,607 +0,0 @@
1% Options for packages loaded elsewhere
2\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
3\PassOptionsToPackage{hyphens}{url}
4$if(colorlinks)$
5\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
6$endif$
7$if(dir)$
8$if(latex-dir-rtl)$
9\PassOptionsToPackage{RTLdocument}{bidi}
10$endif$
11$endif$
12$if(CJKmainfont)$
13\PassOptionsToPackage{space}{xeCJK}
14$endif$
15%
16\documentclass[
17$if(fontsize)$
18 $fontsize$,
19$endif$
20$if(lang)$
21 $babel-lang$,
22$endif$
23$if(papersize)$
24 $papersize$paper,
25$endif$
26$if(beamer)$
27 ignorenonframetext,
28$if(handout)$
29 handout,
30$endif$
31$if(aspectratio)$
32 aspectratio=$aspectratio$,
33$endif$
34$endif$
35$for(classoption)$
36 $classoption$$sep$,
37$endfor$
38]{$documentclass$}
39$if(beamer)$
40$if(background-image)$
41\usebackgroundtemplate{%
42 \includegraphics[width=\paperwidth]{$background-image$}%
43}
44$endif$
45\usepackage{pgfpages}
46\setbeamertemplate{caption}[numbered]
47\setbeamertemplate{caption label separator}{: }
48\setbeamercolor{caption name}{fg=normal text.fg}
49\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
50$for(beameroption)$
51\setbeameroption{$beameroption$}
52$endfor$
53% Prevent slide breaks in the middle of a paragraph
54\widowpenalties 1 10000
55\raggedbottom
56$if(section-titles)$
57\setbeamertemplate{part page}{
58 \centering
59 \begin{beamercolorbox}[sep=16pt,center]{part title}
60 \usebeamerfont{part title}\insertpart\par
61 \end{beamercolorbox}
62}
63\setbeamertemplate{section page}{
64 \centering
65 \begin{beamercolorbox}[sep=12pt,center]{part title}
66 \usebeamerfont{section title}\insertsection\par
67 \end{beamercolorbox}
68}
69\setbeamertemplate{subsection page}{
70 \centering
71 \begin{beamercolorbox}[sep=8pt,center]{part title}
72 \usebeamerfont{subsection title}\insertsubsection\par
73 \end{beamercolorbox}
74}
75\AtBeginPart{
76 \frame{\partpage}
77}
78\AtBeginSection{
79 \ifbibliography
80 \else
81 \frame{\sectionpage}
82 \fi
83}
84\AtBeginSubsection{
85 \frame{\subsectionpage}
86}
87$endif$
88$endif$
89$if(beamerarticle)$
90\usepackage{beamerarticle} % needs to be loaded first
91$endif$
92\usepackage{amsmath,amssymb}
93$if(fontfamily)$
94\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
95$else$
96\usepackage{lmodern}
97$endif$
98$if(linestretch)$
99\usepackage{setspace}
100$endif$
101\usepackage{iftex}
102\ifPDFTeX
103 \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
104 \usepackage[utf8]{inputenc}
105 \usepackage{textcomp} % provide euro and other symbols
106\else % if luatex or xetex
107$if(mathspec)$
108 \ifXeTeX
109 \usepackage{mathspec}
110 \else
111 \usepackage{unicode-math}
112 \fi
113$else$
114 \usepackage{unicode-math}
115$endif$
116 \defaultfontfeatures{Scale=MatchLowercase}
117 \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
118$if(mainfont)$
119 \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
120$endif$
121$if(sansfont)$
122 \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
123$endif$
124$if(monofont)$
125 \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
126$endif$
127$for(fontfamilies)$
128 \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
129$endfor$
130$if(mathfont)$
131$if(mathspec)$
132 \ifXeTeX
133 \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
134 \else
135 \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
136 \fi
137$else$
138 \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
139$endif$
140$endif$
141$if(CJKmainfont)$
142 \ifXeTeX
143 \usepackage{xeCJK}
144 \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
145 \fi
146$endif$
147$if(luatexjapresetoptions)$
148 \ifLuaTeX
149 \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
150 \fi
151$endif$
152$if(CJKmainfont)$
153 \ifLuaTeX
154 \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
155 \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
156 \fi
157$endif$
158\fi
159$if(beamer)$
160$if(theme)$
161\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
162$endif$
163$if(colortheme)$
164\usecolortheme[$for(colorthemeoptions)$$colorthemeoptions$$sep$,$endfor$]{$colortheme$}
165$endif$
166$if(fonttheme)$
167\usefonttheme{$fonttheme$}
168$endif$
169$if(mainfont)$
170\usefonttheme{serif} % use mainfont rather than sansfont for slide text
171$endif$
172$if(innertheme)$
173\useinnertheme{$innertheme$}
174$endif$
175$if(outertheme)$
176\useoutertheme{$outertheme$}
177$endif$
178$endif$
179% Use upquote if available, for straight quotes in verbatim environments
180\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
181\IfFileExists{microtype.sty}{% use microtype if available
182 \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
183 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
184}{}
185$if(indent)$
186$else$
187\makeatletter
188\@ifundefined{KOMAClassName}{% if non-KOMA class
189 \IfFileExists{parskip.sty}{%
190 \usepackage{parskip}
191 }{% else
192 \setlength{\parindent}{0pt}
193 \setlength{\parskip}{6pt plus 2pt minus 1pt}}
194}{% if KOMA class
195 \KOMAoptions{parskip=half}}
196\makeatother
197$endif$
198$if(verbatim-in-note)$
199\usepackage{fancyvrb}
200$endif$
201\usepackage{xcolor}
202\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
203\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
204\hypersetup{
205$if(title-meta)$
206 pdftitle={$title-meta$},
207$endif$
208$if(author-meta)$
209 pdfauthor={$author-meta$},
210$endif$
211$if(lang)$
212 pdflang={$lang$},
213$endif$
214$if(subject)$
215 pdfsubject={$subject$},
216$endif$
217$if(keywords)$
218 pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
219$endif$
220$if(colorlinks)$
221 colorlinks=true,
222 linkcolor={$if(linkcolor)$$linkcolor$$else$Maroon$endif$},
223 filecolor={$if(filecolor)$$filecolor$$else$Maroon$endif$},
224 citecolor={$if(citecolor)$$citecolor$$else$Blue$endif$},
225 urlcolor={$if(urlcolor)$$urlcolor$$else$Blue$endif$},
226$else$
227 hidelinks,
228$endif$
229 pdfcreator={LaTeX via pandoc}}
230\urlstyle{same} % disable monospaced font for URLs
231$if(verbatim-in-note)$
232\VerbatimFootnotes % allow verbatim text in footnotes
233$endif$
234$if(geometry)$
235$if(beamer)$
236\geometry{$for(geometry)$$geometry$$sep$,$endfor$}
237$else$
238\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
239$endif$
240$endif$
241$if(beamer)$
242\newif\ifbibliography
243$endif$
244$if(listings)$
245\usepackage{listings}
246\newcommand{\passthrough}[1]{#1}
247\lstset{defaultdialect=[5.3]Lua}
248\lstset{defaultdialect=[x86masm]Assembler}
249$endif$
250$if(lhs)$
251\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
252$endif$
253$if(highlighting-macros)$
254$highlighting-macros$
255$endif$
256$if(tables)$
257\usepackage{longtable,booktabs,array}
258$if(multirow)$
259\usepackage{multirow}
260$endif$
261\usepackage{calc} % for calculating minipage widths
262$if(beamer)$
263\usepackage{caption}
264% Make caption package work with longtable
265\makeatletter
266\def\fnum@table{\tablename~\thetable}
267\makeatother
268$else$
269% Correct order of tables after \paragraph or \subparagraph
270\usepackage{etoolbox}
271\makeatletter
272\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
273\makeatother
274% Allow footnotes in longtable head/foot
275\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
276\makesavenoteenv{longtable}
277$endif$
278$endif$
279$if(graphics)$
280\usepackage{graphicx}
281\makeatletter
282\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
283\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
284\makeatother
285% Scale images if necessary, so that they will not overflow the page
286% margins by default, and it is still possible to overwrite the defaults
287% using explicit options in \includegraphics[width, height, ...]{}
288\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
289% Set default figure placement to htbp
290\makeatletter
291\def\fps@figure{htbp}
292\makeatother
293$endif$
294$if(links-as-notes)$
295% Make links footnotes instead of hotlinks:
296\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
297$endif$
298$if(strikeout)$
299\usepackage[normalem]{ulem}
300% Avoid problems with \sout in headers with hyperref
301\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
302$endif$
303\setlength{\emergencystretch}{3em} % prevent overfull lines
304\providecommand{\tightlist}{%
305 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
306$if(numbersections)$
307\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
308$else$
309\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
310$endif$
311$if(beamer)$
312$else$
313$if(block-headings)$
314% Make \paragraph and \subparagraph free-standing
315\ifx\paragraph\undefined\else
316 \let\oldparagraph\paragraph
317 \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
318\fi
319\ifx\subparagraph\undefined\else
320 \let\oldsubparagraph\subparagraph
321 \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
322\fi
323$endif$
324$endif$
325$if(pagestyle)$
326\pagestyle{$pagestyle$}
327$endif$
328
329$if(beamer)$
330% Make toc brighter
331\setbeamercolor{section in toc}{
332 use=normal text,
333 fg=normal text.fg
334}
335\setbeamercolor{subsection in toc}{
336 use=normal text,
337 fg=normal text.fg
338}
339% Add background to blocks
340\setbeamercolor*{block title}{
341 bg=normal text.bg!80!normal text.fg,
342}
343\setbeamercolor*{block body}{
344 bg=normal text.bg!90!normal text.fg,
345}
346$else$
347\definecolor{normal text.fg}{named}{black}
348\definecolor{normal text.bg}{named}{white}
349% From Owl
350\definecolor{OwlRed}{RGB}{ 255, 92, 168}
351\definecolor{OwlGreen}{RGB}{ 90, 168, 0}
352\definecolor{OwlBlue}{RGB}{ 0, 152, 233}
353\definecolor{OwlYellow}{RGB}{ 242, 147, 24}
354\colorlet{OwlViolet}{OwlRed!50!OwlBlue}
355\colorlet{OwlBrown}{OwlRed!50!OwlGreen}
356\colorlet{OwlOrange}{OwlRed!50!OwlYellow}
357\colorlet{OwlCyan}{OwlGreen!50!OwlBlue}
358\colorlet{red}{OwlRed}
359\colorlet{green}{OwlGreen}
360\colorlet{blue}{OwlBlue}
361\colorlet{yellow}{OwlYellow}
362\colorlet{violet}{OwlViolet}
363\colorlet{brown}{OwlBrown}
364\colorlet{orange}{OwlOrange}
365\colorlet{cyan}{OwlCyan}
366$endif$
367
368\usepackage{fvextra}
369
370\usepackage[outputdir=build]{minted}
371\usemintedstyle{$if(minted.style)$$minted.style$$else$$if(beamer)$inkpot$else$perldoc$endif$$endif$}
372\setminted{tabsize=4,breaklines,numbersep=3mm,linenos,highlightcolor=violet!40!normal text.bg}
373
374\setmonofont{Fira Code}[
375 Scale=0.87096774193548387, % 459/527
376 ItalicFont={Latin Modern Mono 10 Italic},
377 Contextuals=Alternate,
378 StylisticSet={6,8},
379]
380
381\usepackage{tcolorbox}
382\tcbuselibrary{skins,breakable}
383
384\renewcommand{\theFancyVerbLine}{\ttfamily\scriptsize\textcolor{normal text.fg!60!normal text.bg}{\arabic{FancyVerbLine}}}
385
386\BeforeBeginEnvironment{minted}{\begin{tcolorbox}[
387 breakable,
388 tile,
389 enhanced,
390 left=6mm,
391 colbacktitle=normal text.bg!80!normal text.fg,
392 coltitle=normal text.fg,
393 coltext=normal text.fg,
394 fonttitle=\ttfamily\bfseries,
395 colback=normal text.bg!90!normal text.fg,
396 overlay={
397 \begin{tcbclipinterior}
398 \fill[normal text.bg!85!normal text.fg] (frame.south west) rectangle ([xshift=5mm]frame.north west);
399 \end{tcbclipinterior}
400 }
401]}
402\AfterEndEnvironment{minted}{\end{tcolorbox}}
403
404\makeatletter
405\def\verbatim@nolig@list{}
406\makeatother
407
408$for(header-includes)$
409$header-includes$
410$endfor$
411$if(lang)$
412\ifXeTeX
413 % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
414 \usepackage{polyglossia}
415 \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
416$for(polyglossia-otherlangs)$
417 \setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
418$endfor$
419\else
420 \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
421% get rid of language-specific shorthands (see #6817):
422\let\LanguageShortHands\languageshorthands
423\def\languageshorthands#1{}
424$if(babel-newcommands)$
425 $babel-newcommands$
426$endif$
427\fi
428$endif$
429\ifLuaTeX
430 \usepackage{selnolig} % disable illegal ligatures
431\fi
432$if(dir)$
433\ifXeTeX
434 % Load bidi as late as possible as it modifies e.g. graphicx
435 \usepackage{bidi}
436\fi
437\ifPDFTeX
438 \TeXXeTstate=1
439 \newcommand{\RL}[1]{\beginR #1\endR}
440 \newcommand{\LR}[1]{\beginL #1\endL}
441 \newenvironment{RTL}{\beginR}{\endR}
442 \newenvironment{LTR}{\beginL}{\endL}
443\fi
444$endif$
445$if(natbib)$
446\usepackage[$natbiboptions$]{natbib}
447\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
448$endif$
449$if(biblatex)$
450\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
451$for(bibliography)$
452\addbibresource{$bibliography$}
453$endfor$
454$endif$
455$if(nocite-ids)$
456\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
457$endif$
458$if(csl-refs)$
459\newlength{\cslhangindent}
460\setlength{\cslhangindent}{1.5em}
461\newlength{\csllabelwidth}
462\setlength{\csllabelwidth}{3em}
463\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
464 {% don't indent paragraphs
465 \setlength{\parindent}{0pt}
466 % turn on hanging indent if param 1 is 1
467 \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
468 % set entry spacing
469 \ifnum #2 > 0
470 \setlength{\parskip}{#2\baselineskip}
471 \fi
472 }%
473 {}
474\usepackage{calc}
475\newcommand{\CSLBlock}[1]{#1\hfill\break}
476\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
477\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
478\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
479$endif$
480$if(csquotes)$
481\usepackage{csquotes}
482$endif$
483
484$if(title)$
485\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
486$endif$
487$if(subtitle)$
488$if(beamer)$
489$else$
490\usepackage{etoolbox}
491\makeatletter
492\providecommand{\subtitle}[1]{% add subtitle to \maketitle
493 \apptocmd{\@title}{\par {\large #1 \par}}{}{}
494}
495\makeatother
496$endif$
497\subtitle{$subtitle$}
498$endif$
499\author{$for(author)$$author$$sep$ \and $endfor$}
500\date{$date$}
501$if(beamer)$
502$if(institute)$
503\institute{$for(institute)$$institute$$sep$ \and $endfor$}
504$endif$
505$if(titlegraphic)$
506\titlegraphic{\includegraphics{$titlegraphic$}}
507$endif$
508$if(logo)$
509\logo{\includegraphics{$logo$}}
510$endif$
511$endif$
512
513\begin{document}
514$if(has-frontmatter)$
515\frontmatter
516$endif$
517$if(title)$
518$if(beamer)$
519\frame{\titlepage}
520$else$
521\maketitle
522$endif$
523$if(abstract)$
524\begin{abstract}
525$abstract$
526\end{abstract}
527$endif$
528$endif$
529
530$for(include-before)$
531$include-before$
532
533$endfor$
534$if(toc)$
535$if(toc-title)$
536\renewcommand*\contentsname{$toc-title$}
537$endif$
538$if(beamer)$
539\begin{frame}[allowframebreaks]
540$if(toc-title)$
541 \frametitle{$toc-title$}
542$endif$
543 \tableofcontents[hideallsubsections]
544\end{frame}
545$else$
546{
547$if(colorlinks)$
548\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
549$endif$
550\setcounter{tocdepth}{$toc-depth$}
551\tableofcontents
552}
553$endif$
554$endif$
555$if(lot)$
556\listoftables
557$endif$
558$if(lof)$
559\listoffigures
560$endif$
561$if(linestretch)$
562\setstretch{$linestretch$}
563$endif$
564$if(has-frontmatter)$
565\mainmatter
566$endif$
567$body$
568
569$if(has-frontmatter)$
570\backmatter
571$endif$
572$if(natbib)$
573$if(bibliography)$
574$if(biblio-title)$
575$if(has-chapters)$
576\renewcommand\bibname{$biblio-title$}
577$else$
578\renewcommand\refname{$biblio-title$}
579$endif$
580$endif$
581$if(beamer)$
582\begin{frame}[allowframebreaks]{$biblio-title$}
583 \bibliographytrue
584$endif$
585 \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
586$if(beamer)$
587\end{frame}
588$endif$
589
590$endif$
591$endif$
592$if(biblatex)$
593$if(beamer)$
594\begin{frame}[allowframebreaks]{$biblio-title$}
595 \bibliographytrue
596 \printbibliography[heading=none]
597\end{frame}
598$else$
599\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
600$endif$
601
602$endif$
603$for(include-after)$
604$include-after$
605
606$endfor$
607\end{document}