git.iko.soy/typeable/pandoc
on master help sign in
Combine LaTeX/Beamer templates
a89aa1aAndrew Dunning
data/templates/default.latex+97−1
@@ -4,7 +4,13 @@ $if(colorlinks)$
4\PassOptionsToPackage{usenames,dvipsnames}{color}
4\PassOptionsToPackage{usenames,dvipsnames}{color}
5$endif$
5$endif$
6%
6%
7−\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
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$
8$if(beamerarticle)$
14$if(beamerarticle)$
9\usepackage{beamerarticle} % needs to be loaded first
15\usepackage{beamerarticle} % needs to be loaded first
10$endif$
16$endif$
@@ -81,6 +87,26 @@ $if(CJKmainfont)$
81 \fi
87 \fi
82$endif$
88$endif$
83\fi
89\fi
90+$if(beamer)$
91+$if(theme)$
92+\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
93+$endif$
94+$if(colortheme)$
95+\usecolortheme{$colortheme$}
96+$endif$
97+$if(fonttheme)$
98+\usefonttheme{$fonttheme$}
99+$endif$
100+$if(mainfont)$
101+\usefonttheme{serif} % use mainfont rather than sansfont for slide text
102+$endif$
103+$if(innertheme)$
104+\useinnertheme{$innertheme$}
105+$endif$
106+$if(outertheme)$
107+\useoutertheme{$outertheme$}
108+$endif$
109+$endif$
84% use upquote if available, for straight quotes in verbatim environments
110% use upquote if available, for straight quotes in verbatim environments
85\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
111\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
86% use microtype if available
112% use microtype if available
@@ -127,6 +153,9 @@ $endif$
127$if(geometry)$
153$if(geometry)$
128\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
154\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
129$endif$
155$endif$
156+$if(beamer)$
157+\newif\ifbibliography
158+$endif$
130$if(natbib)$
159$if(natbib)$
131\usepackage[$natbiboptions$]{natbib}
160\usepackage[$natbiboptions$]{natbib}
132\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
161\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
@@ -151,6 +180,13 @@ $if(tables)$
151\usepackage{longtable,booktabs}
180\usepackage{longtable,booktabs}
152% Fix footnotes in tables (requires footnote package)
181% Fix footnotes in tables (requires footnote package)
153\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{}
182\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{}
183+$if(beamer)$
184+\usepackage{caption}
185+% These lines are needed to make table captions work with longtable:
186+\makeatletter
187+\def\fnum@table{\tablename~\thetable}
188+\makeatother
189+$endif$
154$endif$
190$endif$
155$if(graphics)$
191$if(graphics)$
156\usepackage{graphicx,grffile}
192\usepackage{graphicx,grffile}
@@ -163,6 +199,31 @@ $if(graphics)$
163% using explicit options in \includegraphics[width, height, ...]{}
199% using explicit options in \includegraphics[width, height, ...]{}
164\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
200\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
165$endif$
201$endif$
202+$if(beamer)$
203+% Prevent slide breaks in the middle of a paragraph:
204+\widowpenalties 1 10000
205+\raggedbottom
206+$if(section-titles)$
207+\AtBeginPart{
208+ \let\insertpartnumber\relax
209+ \let\partname\relax
210+ \frame{\partpage}
211+}
212+\AtBeginSection{
213+ \ifbibliography
214+ \else
215+ \let\insertsectionnumber\relax
216+ \let\sectionname\relax
217+ \frame{\sectionpage}
218+ \fi
219+}
220+\AtBeginSubsection{
221+ \let\insertsubsectionnumber\relax
222+ \let\subsectionname\relax
223+ \frame{\subsectionpage}
224+}
225+$endif$
226+$endif$
166$if(links-as-notes)$
227$if(links-as-notes)$
167% Make links footnotes instead of hotlinks:
228% Make links footnotes instead of hotlinks:
168\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
229\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
@@ -180,6 +241,8 @@ $if(numbersections)$
180$else$
241$else$
181\setcounter{secnumdepth}{0}
242\setcounter{secnumdepth}{0}
182$endif$
243$endif$
244+$if(beamer)$
245+$else$
183$if(subparagraph)$
246$if(subparagraph)$
184$else$
247$else$
185% Redefines (sub)paragraphs to behave more like sections
248% Redefines (sub)paragraphs to behave more like sections
@@ -192,6 +255,7 @@ $else$
192\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
255\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
193\fi
256\fi
194$endif$
257$endif$
258+$endif$
195$if(lang)$
259$if(lang)$
196\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
260\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
197 \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
261 \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
@@ -249,9 +313,20 @@ $if(institute)$
249\institute{$for(institute)$$institute$$sep$ \and $endfor$}
313\institute{$for(institute)$$institute$$sep$ \and $endfor$}
250$endif$
314$endif$
251\date{$date$}
315\date{$date$}
316+$if(beamer)$
317+$if(titlegraphic)$
318+\titlegraphic{\includegraphics{$titlegraphic$}}
319+$endif$
320+$if(logo)$
321+\logo{\includegraphics{$logo$}}
322+$endif$
323+$endif$
252
324
253\begin{document}
325\begin{document}
254$if(title)$
326$if(title)$
327+$if(beamer)$
328+\frame{\titlepage}
329+$else$
255\maketitle
330\maketitle
256$endif$
331$endif$
257$if(abstract)$
332$if(abstract)$
@@ -259,12 +334,18 @@ $if(abstract)$
259$abstract$
334$abstract$
260\end{abstract}
335\end{abstract}
261$endif$
336$endif$
337+$endif$
262
338
263$for(include-before)$
339$for(include-before)$
264$include-before$
340$include-before$
265
341
266$endfor$
342$endfor$
267$if(toc)$
343$if(toc)$
344+$if(beamer)$
345+\begin{frame}
346+\tableofcontents[hideallsubsections]
347+\end{frame}
348+$else$
268{
349{
269$if(colorlinks)$
350$if(colorlinks)$
270\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
351\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
@@ -273,6 +354,7 @@ $endif$
273\tableofcontents
354\tableofcontents
274}
355}
275$endif$
356$endif$
357+$endif$
276$if(lot)$
358$if(lot)$
277\listoftables
359\listoftables
278$endif$
360$endif$
@@ -290,12 +372,26 @@ $else$
290\renewcommand\refname{$biblio-title$}
372\renewcommand\refname{$biblio-title$}
291$endif$
373$endif$
292$endif$
374$endif$
375+$if(beamer)$
376+\begin{frame}[allowframebreaks]{$biblio-title$}
377+\bibliographytrue
378+$endif$
293\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
379\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
380+$if(beamer)$
381+\end{frame}
382+$endif$
294
383
295$endif$
384$endif$
296$endif$
385$endif$
297$if(biblatex)$
386$if(biblatex)$
387+$if(beamer)$
388+\begin{frame}[allowframebreaks]{$biblio-title$}
389+\bibliographytrue
390+\printbibliography[heading=none]
391+\end{frame}
392+$else$
298\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
393\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
394+$endif$
299
395
300$endif$
396$endif$
301$for(include-after)$
397$for(include-after)$