OpenLDAP Presentation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

550 lines
14 KiB

  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. %
  13. \documentclass[
  14. $if(fontsize)$
  15. $fontsize$,
  16. $endif$
  17. $if(lang)$
  18. $babel-lang$,
  19. $endif$
  20. $if(papersize)$
  21. $papersize$paper,
  22. $endif$
  23. $if(beamer)$
  24. ignorenonframetext,
  25. $if(handout)$
  26. handout,
  27. $endif$
  28. $if(aspectratio)$
  29. aspectratio=$aspectratio$,
  30. $endif$
  31. $endif$
  32. $for(classoption)$
  33. $classoption$$sep$,
  34. $endfor$
  35. ]{$documentclass$}
  36. $if(beamer)$
  37. $if(background-image)$
  38. \usebackgroundtemplate{%
  39. \includegraphics[width=\paperwidth]{$background-image$}%
  40. }
  41. $endif$
  42. \usepackage{pgfpages}
  43. \setbeamertemplate{caption}[numbered]
  44. \setbeamertemplate{caption label separator}{: }
  45. \setbeamercolor{caption name}{fg=normal text.fg}
  46. \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$
  47. %%
  48. %%% Definition of colors
  49. %%% Source: https://latexcolor.com/
  50. \definecolor{blanchedalmond}{rgb}{1.0, 0.92, 0.8}
  51. \definecolor{blond}{rgb}{0.98, 0.94, 0.75}
  52. %%% End of definition of colors
  53. %%
  54. $for(beameroption)$
  55. \setbeameroption{$beameroption$}
  56. $endfor$
  57. % Prevent slide breaks in the middle of a paragraph
  58. \widowpenalties 1 10000
  59. \raggedbottom
  60. $if(section-titles)$
  61. \setbeamertemplate{part page}{
  62. \centering
  63. \begin{beamercolorbox}[sep=16pt,center]{part title}
  64. \usebeamerfont{part title}\insertpart\par
  65. \end{beamercolorbox}
  66. }
  67. \setbeamertemplate{section page}{
  68. \centering
  69. \begin{beamercolorbox}[sep=12pt,center]{part title}
  70. \usebeamerfont{section title}\insertsection\par
  71. \end{beamercolorbox}
  72. }
  73. \setbeamertemplate{subsection page}{
  74. \centering
  75. \begin{beamercolorbox}[sep=8pt,center]{part title}
  76. \usebeamerfont{subsection title}\insertsubsection\par
  77. \end{beamercolorbox}
  78. }
  79. \AtBeginPart{
  80. \frame{\partpage}
  81. }
  82. \AtBeginSection{
  83. \ifbibliography
  84. \else
  85. \frame{\sectionpage}
  86. \fi
  87. }
  88. \AtBeginSubsection{
  89. \frame{\subsectionpage}
  90. }
  91. $endif$
  92. $endif$
  93. $if(beamerarticle)$
  94. \usepackage{beamerarticle} % needs to be loaded first
  95. $endif$
  96. $if(fontfamily)$
  97. \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
  98. $else$
  99. \usepackage{lmodern}
  100. $endif$
  101. $if(linestretch)$
  102. \usepackage{setspace}
  103. $endif$
  104. \usepackage{amssymb,amsmath}
  105. \usepackage{ifxetex,ifluatex}
  106. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  107. \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc}
  108. \usepackage[utf8]{inputenc}
  109. \usepackage{textcomp} % provide euro and other symbols
  110. \else % if luatex or xetex
  111. $if(mathspec)$
  112. \ifxetex
  113. \usepackage{mathspec}
  114. \else
  115. \usepackage{unicode-math}
  116. \fi
  117. $else$
  118. \usepackage{unicode-math}
  119. $endif$
  120. \defaultfontfeatures{Scale=MatchLowercase}
  121. \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
  122. $if(mainfont)$
  123. \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
  124. $endif$
  125. $if(sansfont)$
  126. \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
  127. $endif$
  128. $if(monofont)$
  129. \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
  130. $endif$
  131. $for(fontfamilies)$
  132. \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
  133. $endfor$
  134. $if(mathfont)$
  135. $if(mathspec)$
  136. \ifxetex
  137. \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  138. \else
  139. \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  140. \fi
  141. $else$
  142. \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
  143. $endif$
  144. $endif$
  145. $if(CJKmainfont)$
  146. \ifxetex
  147. \usepackage{xeCJK}
  148. \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
  149. \fi
  150. $endif$
  151. $if(luatexjapresetoptions)$
  152. \ifluatex
  153. \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
  154. \fi
  155. $endif$
  156. $if(CJKmainfont)$
  157. \ifluatex
  158. \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
  159. \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
  160. \fi
  161. $endif$
  162. \fi
  163. $if(beamer)$
  164. $if(theme)$
  165. \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
  166. $endif$
  167. $if(colortheme)$
  168. \usecolortheme{$colortheme$}
  169. $endif$
  170. $if(fonttheme)$
  171. \usefonttheme{$fonttheme$}
  172. $endif$
  173. $if(mainfont)$
  174. \usefonttheme{serif} % use mainfont rather than sansfont for slide text
  175. $endif$
  176. $if(innertheme)$
  177. \useinnertheme{$innertheme$}
  178. $endif$
  179. $if(outertheme)$
  180. \useoutertheme{$outertheme$}
  181. $endif$
  182. $endif$
  183. % Use upquote if available, for straight quotes in verbatim environments
  184. \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
  185. \IfFileExists{microtype.sty}{% use microtype if available
  186. \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
  187. \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
  188. }{}
  189. $if(indent)$
  190. $else$
  191. \makeatletter
  192. \@ifundefined{KOMAClassName}{% if non-KOMA class
  193. \IfFileExists{parskip.sty}{%
  194. \usepackage{parskip}
  195. }{% else
  196. \setlength{\parindent}{0pt}
  197. \setlength{\parskip}{6pt plus 2pt minus 1pt}}
  198. }{% if KOMA class
  199. \KOMAoptions{parskip=half}}
  200. \makeatother
  201. $endif$
  202. $if(verbatim-in-note)$
  203. \usepackage{fancyvrb}
  204. $endif$
  205. \usepackage{xcolor}
  206. \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
  207. \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
  208. \hypersetup{
  209. $if(title-meta)$
  210. pdftitle={$title-meta$},
  211. $endif$
  212. $if(author-meta)$
  213. pdfauthor={$author-meta$},
  214. $endif$
  215. $if(lang)$
  216. pdflang={$lang$},
  217. $endif$
  218. $if(subject)$
  219. pdfsubject={$subject$},
  220. $endif$
  221. $if(keywords)$
  222. pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
  223. $endif$
  224. $if(colorlinks)$
  225. colorlinks=true,
  226. linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
  227. filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
  228. citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
  229. urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
  230. $else$
  231. hidelinks,
  232. $endif$
  233. pdfcreator={LaTeX via pandoc}}
  234. \urlstyle{same} % disable monospaced font for URLs
  235. $if(verbatim-in-note)$
  236. \VerbatimFootnotes % allow verbatim text in footnotes
  237. $endif$
  238. $if(geometry)$
  239. $if(beamer)$
  240. \geometry{$for(geometry)$$geometry$$sep$,$endfor$}
  241. $else$
  242. \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
  243. $endif$
  244. $endif$
  245. $if(beamer)$
  246. \newif\ifbibliography
  247. $endif$
  248. $if(listings)$
  249. \usepackage{listings}
  250. \newcommand{\passthrough}[1]{#1}
  251. \lstset{defaultdialect=sh}
  252. \lstset{framexleftmargin=0mm, frame=trBL,backgroundcolor=\color{blanchedalmond!5},numbers=left,numberstyle=\scriptsize,basicstyle=\small}
  253. \lstset{aboveskip=5mm,belowskip=5mm,xleftmargin=20pt,xrightmargin=5pt}
  254. % \lstset{prebreak={\raisebox{0ex}[0ex][0ex]}}
  255. % \lstset{postbreak={\raisebox{0ex}[0ex][0ex]\space}}
  256. \lstset{breaklines=true,breakatwhitespace=true}
  257. $endif$
  258. $if(lhs)$
  259. \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
  260. $endif$
  261. $if(highlighting-macros)$
  262. $highlighting-macros$
  263. $endif$
  264. $if(tables)$
  265. \usepackage{longtable,booktabs}
  266. $if(beamer)$
  267. \usepackage{caption}
  268. % Make caption package work with longtable
  269. \makeatletter
  270. \def\fnum@table{\tablename~\thetable}
  271. \makeatother
  272. $else$
  273. % Correct order of tables after \paragraph or \subparagraph
  274. \usepackage{etoolbox}
  275. \makeatletter
  276. \patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
  277. \makeatother
  278. % Allow footnotes in longtable head/foot
  279. \IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
  280. \makesavenoteenv{longtable}
  281. $endif$
  282. $endif$
  283. $if(graphics)$
  284. \usepackage{graphicx,grffile}
  285. \makeatletter
  286. \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
  287. \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
  288. \makeatother
  289. % Scale images if necessary, so that they will not overflow the page
  290. % margins by default, and it is still possible to overwrite the defaults
  291. % using explicit options in \includegraphics[width, height, ...]{}
  292. \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
  293. % Set default figure placement to htbp
  294. \makeatletter
  295. \def\fps@figure{htbp}
  296. \makeatother
  297. $endif$
  298. $if(links-as-notes)$
  299. % Make links footnotes instead of hotlinks:
  300. \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
  301. $endif$
  302. $if(strikeout)$
  303. \usepackage[normalem]{ulem}
  304. % Avoid problems with \sout in headers with hyperref
  305. \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
  306. $endif$
  307. \setlength{\emergencystretch}{3em} % prevent overfull lines
  308. \providecommand{\tightlist}{%
  309. \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
  310. $if(numbersections)$
  311. \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$}
  312. $else$
  313. \setcounter{secnumdepth}{-\maxdimen} % remove section numbering
  314. $endif$
  315. %
  316. % When using babel or polyglossia with biblatex, loading csquotes is recommended
  317. % to ensure that quoted texts are typeset according to the rules of your main language.
  318. %
  319. \usepackage{csquotes}
  320. %
  321. % blockquote
  322. %
  323. \definecolor{blockquote-border}{RGB}{221,221,221}
  324. \definecolor{blockquote-text}{RGB}{89,89,89}
  325. \usepackage{mdframed}
  326. \newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote}
  327. \renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}%
  328. \item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}}
  329. %
  330. % Source Sans Pro as the de­fault font fam­ily
  331. % Source Code Pro for monospace text
  332. %
  333. % 'default' option sets the default
  334. % font family to Source Sans Pro, not \sfdefault.
  335. %
  336. $if(mainfont)$
  337. $else$
  338. \usepackage[default]{sourcesanspro}
  339. \usepackage{sourcecodepro}
  340. % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887
  341. % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the
  342. % fix is still unreleased.
  343. % TODO: Remove this workaround when the new version of sourcecodepro is reelased on CTAN.
  344. \ifxetex
  345. \makeatletter
  346. \defaultfontfeatures[\ttfamily]
  347. { Numbers = \sourcecodepro@figurestyle,
  348. Scale = \SourceCodePro@scale,
  349. Extension = .otf }
  350. \setmonofont
  351. [ UprightFont = *-\sourcecodepro@regstyle,
  352. ItalicFont = *-\sourcecodepro@regstyle It,
  353. BoldFont = *-\sourcecodepro@boldstyle,
  354. BoldItalicFont = *-\sourcecodepro@boldstyle It ]
  355. {SourceCodePro}
  356. \makeatother
  357. \fi
  358. $endif$
  359. $if(beamer)$
  360. $else$
  361. $if(block-headings)$
  362. % Make \paragraph and \subparagraph free-standing
  363. \ifx\paragraph\undefined\else
  364. \let\oldparagraph\paragraph
  365. \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
  366. \fi
  367. \ifx\subparagraph\undefined\else
  368. \let\oldsubparagraph\subparagraph
  369. \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
  370. \fi
  371. $endif$
  372. $endif$
  373. $if(pagestyle)$
  374. \pagestyle{$pagestyle$}
  375. $endif$
  376. $for(header-includes)$
  377. $header-includes$
  378. $endfor$
  379. $if(lang)$
  380. \ifxetex
  381. % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
  382. \usepackage{polyglossia}
  383. \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
  384. $for(polyglossia-otherlangs)$
  385. \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
  386. $endfor$
  387. \else
  388. \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
  389. $if(babel-newcommands)$
  390. $babel-newcommands$
  391. $endif$
  392. \fi
  393. $endif$
  394. $if(dir)$
  395. \ifxetex
  396. % Load bidi as late as possible as it modifies e.g. graphicx
  397. \usepackage{bidi}
  398. \fi
  399. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  400. \TeXXeTstate=1
  401. \newcommand{\RL}[1]{\beginR #1\endR}
  402. \newcommand{\LR}[1]{\beginL #1\endL}
  403. \newenvironment{RTL}{\beginR}{\endR}
  404. \newenvironment{LTR}{\beginL}{\endL}
  405. \fi
  406. $endif$
  407. $if(natbib)$
  408. \usepackage[$natbiboptions$]{natbib}
  409. \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
  410. $endif$
  411. $if(biblatex)$
  412. \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex}
  413. $for(bibliography)$
  414. \addbibresource{$bibliography$}
  415. $endfor$
  416. $endif$
  417. $if(title)$
  418. \title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
  419. $endif$
  420. $if(subtitle)$
  421. $if(beamer)$
  422. $else$
  423. \usepackage{etoolbox}
  424. \makeatletter
  425. \providecommand{\subtitle}[1]{% add subtitle to \maketitle
  426. \apptocmd{\@title}{\par {\large #1 \par}}{}{}
  427. }
  428. \makeatother
  429. $endif$
  430. \subtitle{$subtitle$}
  431. $endif$
  432. $if(author)$
  433. \author{$for(author)$$author$$sep$ \and $endfor$}
  434. $endif$
  435. \date{$date$}
  436. $if(beamer)$
  437. $if(institute)$
  438. \institute{$for(institute)$$institute$$sep$ \and $endfor$}
  439. $endif$
  440. $if(titlegraphic)$
  441. \titlegraphic{\includegraphics{$titlegraphic$}}
  442. $endif$
  443. $if(logo)$
  444. \logo{\includegraphics{$logo$}}
  445. $endif$
  446. $endif$
  447. \begin{document}
  448. $if(has-frontmatter)$
  449. \frontmatter
  450. $endif$
  451. $if(title)$
  452. $if(beamer)$
  453. \frame{\titlepage}
  454. $else$
  455. \maketitle
  456. $endif$
  457. $if(abstract)$
  458. \begin{abstract}
  459. $abstract$
  460. \end{abstract}
  461. $endif$
  462. $endif$
  463. $for(include-before)$
  464. $include-before$
  465. $endfor$
  466. $if(toc)$
  467. $if(toc-title)$
  468. \renewcommand*\contentsname{$toc-title$}
  469. $endif$
  470. $if(beamer)$
  471. \begin{frame}
  472. $if(toc-title)$
  473. \frametitle{$toc-title$}
  474. $endif$
  475. \tableofcontents[hideallsubsections]
  476. \end{frame}
  477. $else$
  478. {
  479. $if(colorlinks)$
  480. \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$}
  481. $endif$
  482. \setcounter{tocdepth}{$toc-depth$}
  483. \tableofcontents
  484. }
  485. $endif$
  486. $endif$
  487. $if(lot)$
  488. \listoftables
  489. $endif$
  490. $if(lof)$
  491. \listoffigures
  492. $endif$
  493. $if(linestretch)$
  494. \setstretch{$linestretch$}
  495. $endif$
  496. $if(has-frontmatter)$
  497. \mainmatter
  498. $endif$
  499. $body$
  500. $if(has-frontmatter)$
  501. \backmatter
  502. $endif$
  503. $if(natbib)$
  504. $if(bibliography)$
  505. $if(biblio-title)$
  506. $if(has-chapters)$
  507. \renewcommand\bibname{$biblio-title$}
  508. $else$
  509. \renewcommand\refname{$biblio-title$}
  510. $endif$
  511. $endif$
  512. $if(beamer)$
  513. \begin{frame}[allowframebreaks]{$biblio-title$}
  514. \bibliographytrue
  515. $endif$
  516. \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
  517. $if(beamer)$
  518. \end{frame}
  519. $endif$
  520. $endif$
  521. $endif$
  522. $if(biblatex)$
  523. $if(beamer)$
  524. \begin{frame}[allowframebreaks]{$biblio-title$}
  525. \bibliographytrue
  526. \printbibliography[heading=none]
  527. \end{frame}
  528. $else$
  529. \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
  530. $endif$
  531. $endif$
  532. $for(include-after)$
  533. $include-after$
  534. $endfor$
  535. \end{document}