-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelsmd-slides.latex
360 lines (329 loc) · 10.2 KB
/
elsmd-slides.latex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$else$
\usepackage{lmodern}
$endif$
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
\usepackage[utf8]{inputenc}
$if(euro)$
\usepackage{eurosym}
$endif$
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
$if(euro)$
\newcommand{\euro}{€}
$endif$
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$
$if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$endif$
$if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
$endif$
$if(mathfont)$
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$if(CJKmainfont)$
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$endif$
\fi
$if(scuro)$
% light-on-dark slides: white text on 90% black background
\setbeamercolor{normal text}{fg=white,bg=black!90}
% light blue as a highlight color
\setbeamercolor*{structure}{fg=blue!33!white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg}
\setbeamercolor*{palette primary}{use=structure,fg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=structure.fg!95!black}
\setbeamercolor*{palette tertiary}{use=structure,fg=structure.fg!90!black}
\setbeamercolor*{palette quaternary}{use=structure,fg=structure.fg!95!black,bg=black!80}
\setbeamercolor*{framesubtitle}{fg=white}
% N.B. we also skip pandoc's default adjustment to figure captions:
% \setbeamertemplate{caption}[numbered]
% \setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
$endif$
% use system fonts. The sans font will be used
\usefonttheme{professionalfonts}
\setbeamerfont{quote}{shape=\upshape}
% eliminate silly beamer navigation line at bottom of slides
% optionally replace with 3 / 25 little number
$if(slide-numbers)$
\setbeamertemplate{navigation symbols}{\insertpagenumber\ / \insertdocumentendpage}
$else$
\setbeamertemplate{navigation symbols}{}
$endif$
% ensure text jusfication
\usepackage{ragged2e}
\justifying
% pandoc makes 2nd-lever headers into blocks, and this ensures justification
% in blocks too
\addtobeamertemplate{block begin}{}{\justifying}
\urlstyle{$if(urlstyle)$$urlstyle$$else$same$endif$}
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
$if(lang)$
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\else
\usepackage{polyglossia}
\setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
$for(polyglossia-otherlangs)$
\setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
$endfor$
\fi
$endif$
\newif\ifbibliography
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
$endif$
$if(biblatex)$
$if(biblatex-chicago)$
\usepackage[$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex-chicago}
$else$
\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex}
$if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$
$endif$
$if(bibliography)$
\bibliography{$bibliography$}
$endif$
\setbeamertemplate{bibliography item}{}
\setbeamertemplate{frametitle continuation}[from second]
$endif$
$if(listings)$
\usepackage{listings}
$endif$
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$
% tweak code highlighting environment used by pandoc
$if(highlighting-options)$
\RecustomVerbatimEnvironment{Highlighting}{Verbatim}{%
commandchars=\\\{\},%
$for(highlighting-options)$$highlighting-options$$sep$,$endfor$}
$else$
\RecustomVerbatimEnvironment{Highlighting}{Verbatim}{%
commandchars=\\\{\}}
$endif$
$endif$
$if(routput)$
% new environment to be used with R markdown (a knitr hook must also be set)
\usepackage{fancyvrb}
$if(routput-options)$
\DefineVerbatimEnvironment{ROutput}{Verbatim}{%
$for(routput-options)$$routput-options$$sep$,$endfor$}
$else$
\DefineVerbatimEnvironment{ROutput}{Verbatim}{%
formatcom=\color{$if(scuro)$light$else$dark$endif$gray},%
fontsize=\footnotesize}
$endif$
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
\usepackage{longtable,booktabs}
\usepackage{caption}
% These lines are needed to make table captions work with longtable:
\makeatletter
\def\fnum@table{\tablename~\thetable}
\makeatother
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\usepackage[multidot]{grffile}
\setlength{\parskip}{\baselineskip}
$if(section-titles)$
\AtBeginPart{
\let\insertpartnumber\relax
\let\partname\relax
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\let\insertsectionnumber\relax
\let\sectionname\relax
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\let\insertsubsectionnumber\relax
\let\subsectionname\relax
\frame{\subsectionpage}
}
$endif$
$if(links-as-notes)$
% Make links footnotes instead of hotlinks:
\renewcommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(strikeout)$
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
$endif$
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$if(numbersections)$
\setcounter{secnumdepth}{5}
$else$
\setcounter{secnumdepth}{0}
$endif$
$if(dir)$
\ifxetex
% load bidi as late as possible as it modifies e.g. graphicx
$if(latex-dir-rtl)$
\usepackage[RTLdocument]{bidi}
$else$
\usepackage{bidi}
$endif$
\fi
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
\newcommand{\LR}[1]{\beginL #1\endL}
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
$endif$
\usepackage{calc}
$if(beamer-notes)$
\newcounter{slidenum}
\newcounter{slidetotal}
\setbeameroption{show notes}
\setbeamertemplate{note page}{%
\setcounter{slidenum}{\insertpagenumber / 2}
\setcounter{slidetotal}{\insertdocumentendpage / 2}
\hspace*{\fill}\theslidenum\ / \theslidetotal%
\insertnote
}
% force notes page on each slide
\makeatletter
\def\beamer@framenotesbegin{%
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{{}}%
}
\makeatother
$endif$
$if(beamer-handout)$
$if(slide-numbers)$
% blank out slide number on handout no matter what
\setbeamertemplate{navigation symbols}{}
$endif$
\usepackage{pgfpages}
\pgfpagesdeclarelayout{2 on 1 with blanks landscape}{
\edef\pgfpageoptionheight{\the\paperheight}
\edef\pgfpageoptionwidth{\the\paperwidth}
\edef\pgfpageoptionborder{0pt}
}{
\setkeys{pgfpagesuselayoutoption}{landscape}
\pgfpagesphysicalpageoptions{%
logical pages=4,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
% last logical shipout=3%
last logical shipout=2%
}
\pgfpageslogicalpageoptions{1}{%
scale=1,
center=\pgfpoint{.3\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}{%
scale=1,
center=\pgfpoint{.3\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}{%
border shrink=\pgfpageoptionborder,%
resized width=.7\pgfphysicalwidth,%
resized height=.4\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.3\pgfphysicalheight},%
copy from=3
}%
\pgfpageslogicalpageoptions{4}{%
border shrink=\pgfpageoptionborder,%
resized width=.7\pgfphysicalwidth,%
resized height=.4\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.8\pgfphysicalheight},%
copy from=4
}%
\AtBeginDocument{
\newbox\notesbox
\setbox\notesbox=\vbox{
\hsize=\paperwidth
\vskip-1in\hskip-1in\vbox{
\vskip1cm
}
}
\pgfpagesshipoutlogicalpage{3}\copy\notesbox
\pgfpagesshipoutlogicalpage{4}\copy\notesbox
}
}
\pgfpagesuselayout{2 on 1 with blanks landscape}[letterpaper,%
border shrink=0.125in]
$endif$
\usepackage[overlay,absolute]{textpos}
\TPGrid[10 mm,8 mm]{9}{8} % 9x8 grid with units of 12 mm and 10 mm
$for(header-includes)$
$header-includes$
$endfor$
$if(title)$
\title{$title$}
$endif$
$if(subtitle)$
\subtitle{$subtitle$}
$endif$
$if(author)$
\author{$for(author)$$author$$sep$ \and $endfor$}
$endif$
$if(institute)$
\institute{$for(institute)$$institute$$sep$ \and $endfor$}
$endif$
\date{$date$}
\begin{document}
$if(title)$
\frame{\titlepage}
$endif$
$for(include-before)$
$include-before$
$endfor$
$body$
$for(include-after)$
$include-after$
$endfor$
$if(biblio-title)$
\begin{frame}[t,allowframebreaks]{$biblio-title$}
\printbibliography[heading=none]
\end{frame}
$endif$
\end{document}