├── LICENSE ├── README.md ├── _pres-gen.sh ├── img ├── aleph0-small.png ├── aleph0.png ├── fancy-layout.png ├── my_template.png ├── three-col-30-40-30.png ├── three-col-eq.png ├── two-col-40-60.png ├── two-col-eq.png ├── two-col-im-tab.png └── two-col-im-txt.png ├── pandoc └── templates │ ├── default_mod.latex │ └── preamble.tex ├── presentation.md ├── presentation.pdf └── presentation_nice_formatting.pdf /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2004 Sam Hocevar 5 | 14 rue de Plaisance, 75014 Paris, France 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Making presentations with Pandoc beamer 2 | 3 | This is a short guide about how I make PDF slides using **beamer** format output from the **pandoc**. 4 | 5 | **Update**: Changes from `xelatex` to `lualatex`. 6 | > I had issues with PDF creation using `xelatex` engine which I could not fix. My script worked on my home Manjaro Linux, but did not work on Ubuntu 20.04 with my corporate setup. 7 | > After some troubleshooting I changed pdf engine to `lualatex` and things went back to normal. 8 | > `lualatex` engine is slower, than `xelatex`, but it gives better output. 9 | 10 | > Note: Commands are updated for the latest Pandoc version: `2.10.x` and newer. 11 | 12 | 13 | ## How-to for docs preparation 14 | 15 | ### Tools 16 | 17 | - **pandoc** 18 | 19 | - template: I use my own modified template in order to produce nicer looking listings of code. This template you can download [here](pandoc/templates/default_mod.latex). 20 | 21 | - Matrix of beamer themes: [https://hartwork.org/beamer-theme-matrix/](https://hartwork.org/beamer-theme-matrix/) 22 | 23 | - Font themes: [https://deic-web.uab.cat/~iblanes/beamer_gallery/index_by_font.html](https://deic-web.uab.cat/~iblanes/beamer_gallery/index_by_font.html) 24 | 25 | - **texlive** 26 | - **convert** 27 | 28 | - converts and formats images. 29 | - it is used here for the change of DPI of the images and convert to PNG. 30 | - **convert** is the utility which is part of the **ImageMagick** package. 31 | 32 | I did not install **convert** tool, it seems like it is installed by default in Ubuntu or comes with **texlive**. 33 | To avoid possible issues with **pdflatex** engine I did full installation of **texlive** packet. 34 | 35 | In Debian family (with **apt**): 36 | 37 | ```sh 38 | sudo apt-get update 39 | sudo apt-get install pandoc 40 | sudo apt-get install imagemagick 41 | ``` 42 | 43 | > `apt` will install pretty old version of Pandoc and some features will be missing. If you want latest version of this application, download latest package for your system from the project page: [https://github.com/jgm/pandoc/releases](https://github.com/jgm/pandoc/releases). 44 | I use following `texlive` packages: 45 | 46 | ```sh 47 | sudo apt-get install texlive-latex-recommended 48 | sudo apt-get install texlive-fonts-recommended 49 | sudo apt-get install texlive-latex-extra 50 | sudo apt-get install texlive-fonts-extra 51 | sudo apt-get install texlive-xetex 52 | ``` 53 | I recommend to use Pandoc of **2.10.x** or newer version for the creation of presentation because not all beamer features are supported in the Pandoc 1.x. 54 | 55 | ### Instructions and commands 56 | 57 | #### YAML Block for LaTex template 58 | 59 | This YAML block in the beginning of the MarkDown file defines parameters used by the Pandoc engine and relevant LaTex template parameters. This particular example below instructs Pandoc to produce PDF slides file with particular theme, color theme, etc. 60 | 61 | ```yaml 62 | title: "My wonderful presentation" 63 | author: "Alexey Gumirov" 64 | institute: "My home office" 65 | topic: "Pandoc how-to" 66 | theme: "Frankfurt" 67 | colortheme: "beaver" 68 | fonttheme: "professionalfonts" 69 | mainfont: "Hack Nerd Font" 70 | fontsize: 10pt 71 | urlcolor: red 72 | linkstyle: bold 73 | aspectratio: 169 74 | titlegraphic: img/aleph0.png 75 | logo: img/aleph0-small.png 76 | date: 77 | lang: en-US 78 | section-titles: false 79 | toc: true 80 | ``` 81 | 82 | This YAML block is inserted in the beginning of the markdown file. 83 | 84 | The font I use for presentation (Hack Nerd Font) you can get on the [nerdfonts.com](https://nerdfonts.com) page. 85 | 86 | #### Images preparation 87 | 88 | The same way as in [my pandoc for PDF project](https://github.com/alexeygumirov/pandoc-for-pdf-how-to#images-preparation) 89 | 90 | #### Pandoc command 91 | 92 | > All Pandoc commands are for the Pandoc version 2.x. 93 | 94 | > Since version 2.11 Pandoc warns that source format `markdown_github` is deprecated. 95 | > For my formatting following replacement works: 96 | > 97 | > `markdown_github` ⇒ 98 | > 99 | > ```sh 100 | > markdown_strict+pipe_tables+backtick_code_blocks+auto_identifiers+strikeout 101 | > ``` 102 | > Below all scripts are given with the new `markdown_strict` source format. 103 | 104 | ```sh 105 | #!/usr/bin/sh 106 | 107 | DATE_COVER=$(date "+%d %B %Y") 108 | 109 | SOURCE_FORMAT="markdown_strict\ 110 | +pipe_tables\ 111 | +backtick_code_blocks\ 112 | +auto_identifiers\ 113 | +strikeout\ 114 | +yaml_metadata_block\ 115 | +implicit_figures\ 116 | +all_symbols_escapable\ 117 | +link_attributes\ 118 | +smart\ 119 | +fenced_divs" 120 | 121 | pandoc -s --dpi=300 --slide-level 2 --toc --listings --shift-heading-level=0 --columns=50 --template default_mod.latex --pdf-engine lualatex -f "$SOURCE_FORMAT" -M date="$DATE_COVER" -V classoption:aspectratio=169 -V lang=en-US -t beamer presentation.md -o presentation.pdf 122 | ``` 123 | 124 | > **--pdf-engine**: It is important to mention, that if you want to use True Type fonts in presentation (which you put in the «mainfont»), the «lualatex» engine for PDF generation must be used. 125 | 126 | > **default_mod.latex**: This is default template which is modified by me to produce better looking listings. In the default template listings of code are not presented nicely, so I had to improve this part. 127 | 128 | Options of the **pandoc** command mean following: 129 | 130 | - `-s`: Standalone document. 131 | 132 | - `-f FORMAT` or `-r FORMAT`: 133 | 134 | - Specify input format. `FORMAT` can be `native` (native Haskell), `json` (JSON version of native AST), `markdown` (pandoc's extended Markdown), `markdown_strict`(original unextended Markdown), `markdown_phpextra` (PHP Markdown Extra), `commonmark` (CommonMark Markdown), `textile` (Textile), `rst` (reStructuredText), `html` (HTML), `docbook` (DocBook), `t2t` (txt2tags), `docx` (docx), `odt` (ODT), `epub` (EPUB), `opml` (OPML), `org` (Emacs Org mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki markup), `haddock` (Haddock markup), or `latex` (LaTeX). If `+lhs` is appended to `markdown`, `rst`, `latex`, or `html`, the input will be treated as literate Haskell source. Markdown syntax extensions can be individually enabled or disabled by appending `+EXTENSION` or `-EXTENSION` to the format name. So, for example, `markdown_strict+footnotes+definition_lists` is strict Markdown with footnotes and definition lists enabled, and `markdown-pipe_tables+hard_line_breaks` is pandoc's Markdown without pipe tables and with hard line breaks. 135 | - `all_symbols_escapable`: Except inside a code block or inline code, any punctuation or space character preceded by a backslash will be treated literally, even if it would normally indicate formatting. 136 | - `auto_identifiers`: A heading without an explicitly specified identifier will be automatically assigned a unique identifier based on the heading text. Allows to make cross references. More information on [Pandoc documentation page](https://pandoc.org/MANUAL.html#extension-auto_identifiers). 137 | - `backtick_code_blocks`: In addition to standard indented code blocks, pandoc supports fenced code blocks. These begin with a row of three or more backticks (\`) and end with a row of backticks that must be at least as long as the starting row. 138 | - `implicit_figures`: An image with nonempty alt text, occurring by itself in a paragraph, will be rendered as a figure with a caption. The image’s alt text will be used as the caption. This extension is very useful when you need to autogenerate captions for figures in the markdown reference format like: `![This is the caption](/url/of/image.png){ width=100% }`. 139 | - `link_attributes`: Allows to add addional attributes to links (to images and refernce links). For pictures we can define width and height. 140 | - `fenced_divs`: Allow special fenced syntax for native `Div` blocks. A `Div` starts with a fence containing at least three consecutive colons plus some attributes. The attributes may optionally be followed by another string of consecutive colons. 141 | - `pipe_tables`: Table syntax identical to Github and PHP Markdown Extra Tables. 142 | - `smart`: Produce typographically correct output, converting straight quotes to curly quotes, --- to em-dashes, -- to en-dashes, and ... to ellipses. Nonbreaking spaces are inserted after certain abbreviations, such as “Mr.” (Note: This option is selected automatically when the output format is latex or context, unless `--no-tex-ligatures` is used. It has no effect for latex input.) 143 | - `strikeout`: To strikeout a section of text with a horizontal line, begin and end it with `~~`. 144 | - `yaml_metadata_block`: A YAML metadata block is a valid YAML object, delimited by a line of three hyphens (---) at the top and a line of three hyphens (---) or three dots (...) at the bottom. A YAML metadata block may occur anywhere in the document, but if it is not at the beginning, it must be preceded by a blank line. 145 | 146 | - `--toc`: `--table-of-contents` 147 | 148 | - Include an automatically generated table of contents (or, in the case of latex, context, docx, and rst, an instruction to create one) in the output document. This option has no effect on man, docbook, docbook5, slidy, slideous, s5, or odt output. 149 | 150 | - `--dpi`: 151 | 152 | - Specify the dpi (dots per inch) value for conversion from pixels to inch/centimeters and vice versa. The **default** is **96dpi**. Technically, the correct term would be ppi (pixels per inch). 153 | 154 | - `--base-header-level=N`: **DEPRECATED (use _--shift-heading-level-by_ instead)**. Specify the base level for heading (default is to 1). 155 | 156 | - `--shift-heading-level-by=N`: Shift heading levels by a positive or negative integer. For example, with `--shift-heading-level-by=-1`, level 2 headings become level 1 headings, and level 3 headings become level 2 headings. I use `--shift-heading-level-by=0` in my scripts. 157 | 158 | - `--slide-level N` 159 | 160 | - Specifies that headings with the specified level create slides (for beamer, s5, slidy, slideous, dzslides). Headings above this level in the hierarchy are used to divide the slide show into sections; headings below this level create subheads within a slide. Note that content that is not contained under slide-level headings will not appear in the slide show. The default is to set the slide level based on the contents of the document. 161 | 162 | - `-V KEY[=VAL]`: `--variable=KEY[:VAL]` 163 | 164 | - Set the template variable KEY to the value VAL when rendering the document in standalone mode. This is generally only useful when the `--template` option is used to specify a custom template, since pandoc automatically sets the variables used in the default templates. If no `VAL` is specified, the key will be given the value true. 165 | - `lang`: one of the `KEY` parameters of `-V` which defines default document language. 166 | - `classoption:aspectratio=169`: produces presentation with 16:9 aspect ratio. 167 | 168 | Additional useful options of the **pandoc** command are: 169 | 170 | - `--listings`: It creates nice presentation of the raw code (like shell code or programming code). 171 | - `--number-section`: Automatically creates enumerated headers. 172 | - `--columns`: Specify length of lines in characters. This affects text wrapping in the generated source code (see --wrap). It also affects calculation of column widths for plain text tables. 173 | - `--default-image-extension`: If you want Pandoc to insert only one type of images, e.g. PNG, then you shall add `--default-image-extension png` in the command line. 174 | - `Preamble` or `-H`: Pandoc lets user include a custom preamble in the generated output. If you have to use some packages in LaTeX ( not so much ), you can include it in the YAML header inside the `header-includes:` tag. For example I want to use package multicol in LaTeX, my header should look like: 175 | 176 | ```yaml 177 | header-includes: 178 | - \usepackage{multicol} 179 | ``` 180 | 181 | Preamble in Pandoc gives you more features than just to import some packages. We can also create our own PDF template. For presentation, we can re-config the Beamer theme. For example, By default, Ilmenau theme does not have slide numbers ( frame number ). So our goal now is to re-config the theme without changing the theme source code. If you are using LaTeX then it quite easy to deal with that. Either does Pandoc, instead of using header-includes tag, we can create a new file called preamble.tex - you can put all the configuration in LaTeX to this file the same way you use LaTeX to create a beamer presentation. Usage: 182 | 183 | ```sh 184 | -H preamble.tex 185 | ``` 186 | 187 | > **preamble.tex**: This is default template which is modified by me to produce better colorscheme, frame number, and re-design footer, etc. In the default template of code, these features are not presented nicely, so I had to improve this part. 188 | 189 | *Screenshot of the theme modified with `preamble.tex`* 190 | 191 | ![Modified theme](img/my_template.png) 192 | 193 | ## Columns on slides 194 | 195 | `fenced_divs` extension allows to divide slide in columns. 196 | 197 | ### Two columns of equal width 198 | 199 | ![Two equal columns](img/two-col-eq.png) 200 | 201 | *Code:* 202 | 203 | ```markdown 204 | ## Two columns of equal width 205 | 206 | ::: columns 207 | 208 | :::: column 209 | 210 | Left column text. 211 | 212 | Another text line. 213 | 214 | :::: 215 | 216 | :::: column 217 | 218 | - Item 1. 219 | - Item 2. 220 | - Item 3. 221 | 222 | :::: 223 | 224 | ::: 225 | ``` 226 | 227 | ### Two columns of with 40:60 split 228 | 229 | ![Two columns of 40:60 split](img/two-col-40-60.png) 230 | 231 | *Code:* 232 | 233 | ```markdown 234 | ## Two columns of with 40:60 split 235 | 236 | ::: columns 237 | 238 | :::: {.column width=40%} 239 | 240 | Left column text. 241 | 242 | Another text line. 243 | 244 | :::: 245 | 246 | :::: {.column width=60%} 247 | 248 | - Item 1. 249 | - Item 2. 250 | - Item 3. 251 | 252 | :::: 253 | 254 | ::: 255 | ``` 256 | 257 | ### Three columns with equal split 258 | 259 | ![Three equal columns](img/three-col-eq.png) 260 | 261 | *Code:* 262 | 263 | ```markdown 264 | ## Three columns with equal split 265 | 266 | ::: columns 267 | 268 | :::: column 269 | 270 | Left column text. 271 | 272 | Another text line. 273 | 274 | :::: 275 | 276 | :::: column 277 | 278 | Middle column list: 279 | 280 | 1. Item 1. 281 | 2. Item 2. 282 | 283 | :::: 284 | 285 | :::: column 286 | 287 | Right column list: 288 | 289 | - Item 1. 290 | - Item 2. 291 | 292 | :::: 293 | 294 | ::: 295 | ``` 296 | 297 | ### Three columns with 30:40:30 split 298 | 299 | ![Three columns with 30:40:40 split](img/three-col-30-40-30.png) 300 | 301 | *Code:* 302 | 303 | ```markdown 304 | ## Three columns with 30:40:30 split 305 | 306 | ::: columns 307 | 308 | :::: {.column width=30%} 309 | 310 | Left column text. 311 | 312 | Another text line. 313 | 314 | :::: 315 | 316 | :::: {.column width=40%} 317 | 318 | Middle column list: 319 | 320 | 1. Item 1. 321 | 2. Item 2. 322 | 323 | :::: 324 | 325 | :::: {.column width=30%} 326 | 327 | Right column list: 328 | 329 | - Item 1. 330 | - Item 2. 331 | 332 | :::: 333 | 334 | ::: 335 | ``` 336 | 337 | ### Two columns: image and text 338 | 339 | ![Two columns: image and text](img/two-col-im-txt.png) 340 | 341 | *Code:* 342 | 343 | ```markdown 344 | ## Two columns: image and text 345 | 346 | ::: columns 347 | 348 | :::: column 349 | 350 | ![](img/aleph0.png){height=50%} 351 | 352 | :::: 353 | 354 | :::: column 355 | 356 | Text in the right column. 357 | 358 | List from the right column: 359 | 360 | - Item 1. 361 | - Item 2. 362 | :::: 363 | 364 | ::: 365 | ``` 366 | 367 | ### Two columns: image and table 368 | 369 | ![Two columns: image and table](img/two-col-im-tab.png) 370 | 371 | *Code:* 372 | 373 | ```markdown 374 | ## Two columns: image and table 375 | 376 | ::: columns 377 | 378 | :::: column 379 | 380 | ![](img/aleph0.png){height=50%} 381 | 382 | :::: 383 | 384 | :::: column 385 | 386 | | **Item** | **Option** | 387 | |:---------|:----------:| 388 | | Item 1 | Option 1 | 389 | | Item 2 | Option 2 | 390 | 391 | :::: 392 | 393 | ::: 394 | ``` 395 | 396 | ### Fancy layout 397 | 398 | ![Fancy layout](img/fancy-layout.png) 399 | 400 | *Code:* 401 | 402 | ```markdown 403 | ## Fancy layout 404 | 405 | ### Proposal 406 | 407 | - Point A 408 | - Point B 409 | 410 | ::: columns 411 | 412 | :::: column 413 | 414 | ### Pros 415 | 416 | - Good 417 | - Better 418 | - Best 419 | 420 | :::: 421 | 422 | :::: column 423 | 424 | ### Cons 425 | 426 | - Bad 427 | - Worse 428 | - Worst 429 | 430 | :::: 431 | 432 | ::: 433 | 434 | ### Conclusion 435 | 436 | - Let's go for it! 437 | - No way we go for it! 438 | ``` 439 | 440 | ## Examples 441 | 442 | - With this [Markdown file](presentation.md) I produce: 443 | - [This presentation](presentation.pdf) with the default theme (small changes only in the YAML header). 444 | - [Modified style presentation](presentation_nice_formatting.pdf) with the modified theme via `preamble.tex` file. 445 | -------------------------------------------------------------------------------- /_pres-gen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | DATE_COVER=$(date "+%d %B %Y") 4 | 5 | SOURCE_FORMAT="markdown_strict\ 6 | +pipe_tables\ 7 | +backtick_code_blocks\ 8 | +auto_identifiers\ 9 | +strikeout\ 10 | +yaml_metadata_block\ 11 | +implicit_figures\ 12 | +all_symbols_escapable\ 13 | +link_attributes\ 14 | +smart\ 15 | +fenced_divs" 16 | 17 | DATA_DIR="pandoc" 18 | PDF_ENGINE="lualatex" 19 | 20 | case "$1" in 21 | "-preamble") 22 | pandoc -s --dpi=300 --slide-level 2 --toc --listings --shift-heading-level=0 --data-dir="${DATA_DIR}" --template default_mod.latex -H pandoc/templates/preamble.tex --pdf-engine "${PDF_ENGINE}" -f "$SOURCE_FORMAT" -M date="$DATE_COVER" -V classoption:aspectratio=169 -t beamer presentation.md -o presentation_nice_formatting.pdf 23 | ;; 24 | *) 25 | pandoc -s --dpi=300 --slide-level 2 --toc --listings --shift-heading-level=0 --data-dir="${DATA_DIR}" --template default_mod.latex --pdf-engine "${PDF_ENGINE}" -f "$SOURCE_FORMAT" -M date="$DATE_COVER" -V classoption:aspectratio=169 -t beamer presentation.md -o presentation.pdf 26 | ;; 27 | esac 28 | -------------------------------------------------------------------------------- /img/aleph0-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/aleph0-small.png -------------------------------------------------------------------------------- /img/aleph0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/aleph0.png -------------------------------------------------------------------------------- /img/fancy-layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/fancy-layout.png -------------------------------------------------------------------------------- /img/my_template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/my_template.png -------------------------------------------------------------------------------- /img/three-col-30-40-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/three-col-30-40-30.png -------------------------------------------------------------------------------- /img/three-col-eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/three-col-eq.png -------------------------------------------------------------------------------- /img/two-col-40-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/two-col-40-60.png -------------------------------------------------------------------------------- /img/two-col-eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/two-col-eq.png -------------------------------------------------------------------------------- /img/two-col-im-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/two-col-im-tab.png -------------------------------------------------------------------------------- /img/two-col-im-txt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/img/two-col-im-txt.png -------------------------------------------------------------------------------- /pandoc/templates/default_mod.latex: -------------------------------------------------------------------------------- 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 | %% 49 | %%% Definition of colors 50 | %%% Source: https://latexcolor.com/ 51 | \definecolor{blanchedalmond}{rgb}{1.0, 0.92, 0.8} 52 | \definecolor{blond}{rgb}{0.98, 0.94, 0.75} 53 | %%% End of definition of colors 54 | %% 55 | 56 | $for(beameroption)$ 57 | \setbeameroption{$beameroption$} 58 | $endfor$ 59 | % Prevent slide breaks in the middle of a paragraph 60 | \widowpenalties 1 10000 61 | \raggedbottom 62 | $if(section-titles)$ 63 | \setbeamertemplate{part page}{ 64 | \centering 65 | \begin{beamercolorbox}[sep=16pt,center]{part title} 66 | \usebeamerfont{part title}\insertpart\par 67 | \end{beamercolorbox} 68 | } 69 | \setbeamertemplate{section page}{ 70 | \centering 71 | \begin{beamercolorbox}[sep=12pt,center]{part title} 72 | \usebeamerfont{section title}\insertsection\par 73 | \end{beamercolorbox} 74 | } 75 | \setbeamertemplate{subsection page}{ 76 | \centering 77 | \begin{beamercolorbox}[sep=8pt,center]{part title} 78 | \usebeamerfont{subsection title}\insertsubsection\par 79 | \end{beamercolorbox} 80 | } 81 | \AtBeginPart{ 82 | \frame{\partpage} 83 | } 84 | \AtBeginSection{ 85 | \ifbibliography 86 | \else 87 | \frame{\sectionpage} 88 | \fi 89 | } 90 | \AtBeginSubsection{ 91 | \frame{\subsectionpage} 92 | } 93 | $endif$ 94 | $endif$ 95 | $if(beamerarticle)$ 96 | \usepackage{beamerarticle} % needs to be loaded first 97 | $endif$ 98 | $if(fontfamily)$ 99 | \usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} 100 | $else$ 101 | \usepackage{lmodern} 102 | $endif$ 103 | $if(linestretch)$ 104 | \usepackage{setspace} 105 | $endif$ 106 | \usepackage{amssymb,amsmath} 107 | \usepackage{ifxetex,ifluatex} 108 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 109 | \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} 110 | \usepackage[utf8]{inputenc} 111 | \usepackage{textcomp} % provide euro and other symbols 112 | \else % if luatex or xetex 113 | $if(mathspec)$ 114 | \ifxetex 115 | \usepackage{mathspec} 116 | \else 117 | \usepackage{unicode-math} 118 | \fi 119 | $else$ 120 | \usepackage{unicode-math} 121 | $endif$ 122 | \defaultfontfeatures{Scale=MatchLowercase} 123 | \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} 124 | $if(mainfont)$ 125 | \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} 126 | $endif$ 127 | $if(sansfont)$ 128 | \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} 129 | $endif$ 130 | $if(monofont)$ 131 | \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} 132 | $endif$ 133 | $for(fontfamilies)$ 134 | \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} 135 | $endfor$ 136 | $if(mathfont)$ 137 | $if(mathspec)$ 138 | \ifxetex 139 | \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 140 | \else 141 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 142 | \fi 143 | $else$ 144 | \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} 145 | $endif$ 146 | $endif$ 147 | $if(CJKmainfont)$ 148 | \ifxetex 149 | \usepackage{xeCJK} 150 | \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 151 | \fi 152 | $endif$ 153 | $if(luatexjapresetoptions)$ 154 | \ifluatex 155 | \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} 156 | \fi 157 | $endif$ 158 | $if(CJKmainfont)$ 159 | \ifluatex 160 | \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} 161 | \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} 162 | \fi 163 | $endif$ 164 | \fi 165 | $if(beamer)$ 166 | $if(theme)$ 167 | \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} 168 | $endif$ 169 | $if(colortheme)$ 170 | \usecolortheme{$colortheme$} 171 | $endif$ 172 | $if(fonttheme)$ 173 | \usefonttheme{$fonttheme$} 174 | $endif$ 175 | $if(mainfont)$ 176 | \usefonttheme{serif} % use mainfont rather than sansfont for slide text 177 | $endif$ 178 | $if(innertheme)$ 179 | \useinnertheme{$innertheme$} 180 | $endif$ 181 | $if(outertheme)$ 182 | \useoutertheme{$outertheme$} 183 | $endif$ 184 | $endif$ 185 | % Use upquote if available, for straight quotes in verbatim environments 186 | \IfFileExists{upquote.sty}{\usepackage{upquote}}{} 187 | \IfFileExists{microtype.sty}{% use microtype if available 188 | \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} 189 | \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts 190 | }{} 191 | $if(indent)$ 192 | $else$ 193 | \makeatletter 194 | \@ifundefined{KOMAClassName}{% if non-KOMA class 195 | \IfFileExists{parskip.sty}{% 196 | \usepackage{parskip} 197 | }{% else 198 | \setlength{\parindent}{0pt} 199 | \setlength{\parskip}{6pt plus 2pt minus 1pt}} 200 | }{% if KOMA class 201 | \KOMAoptions{parskip=half}} 202 | \makeatother 203 | $endif$ 204 | $if(verbatim-in-note)$ 205 | \usepackage{fancyvrb} 206 | $endif$ 207 | \usepackage{xcolor} 208 | \IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available 209 | \IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} 210 | \hypersetup{ 211 | $if(title-meta)$ 212 | pdftitle={$title-meta$}, 213 | $endif$ 214 | $if(author-meta)$ 215 | pdfauthor={$author-meta$}, 216 | $endif$ 217 | $if(lang)$ 218 | pdflang={$lang$}, 219 | $endif$ 220 | $if(subject)$ 221 | pdfsubject={$subject$}, 222 | $endif$ 223 | $if(keywords)$ 224 | pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, 225 | $endif$ 226 | $if(colorlinks)$ 227 | colorlinks=true, 228 | linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, 229 | filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$, 230 | citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, 231 | urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, 232 | $else$ 233 | hidelinks, 234 | $endif$ 235 | pdfcreator={LaTeX via pandoc}} 236 | \urlstyle{same} % disable monospaced font for URLs 237 | $if(verbatim-in-note)$ 238 | \VerbatimFootnotes % allow verbatim text in footnotes 239 | $endif$ 240 | $if(geometry)$ 241 | $if(beamer)$ 242 | \geometry{$for(geometry)$$geometry$$sep$,$endfor$} 243 | $else$ 244 | \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} 245 | $endif$ 246 | $endif$ 247 | $if(beamer)$ 248 | \newif\ifbibliography 249 | $endif$ 250 | $if(listings)$ 251 | \usepackage{listings} 252 | \newcommand{\passthrough}[1]{#1} 253 | \lstset{defaultdialect=sh} 254 | \lstset{framexleftmargin=0mm, frame=trBL,backgroundcolor=\color{blanchedalmond!5},numbers=left,numberstyle=\scriptsize,basicstyle=\small} 255 | \lstset{aboveskip=5mm,belowskip=5mm,xleftmargin=20pt,xrightmargin=5pt} 256 | % \lstset{prebreak={\raisebox{0ex}[0ex][0ex]}} 257 | % \lstset{postbreak={\raisebox{0ex}[0ex][0ex]\space}} 258 | \lstset{breaklines=true,breakatwhitespace=true} 259 | $endif$ 260 | $if(lhs)$ 261 | \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} 262 | $endif$ 263 | $if(highlighting-macros)$ 264 | $highlighting-macros$ 265 | $endif$ 266 | $if(tables)$ 267 | \usepackage{longtable,booktabs} 268 | $if(beamer)$ 269 | \usepackage{caption} 270 | % Make caption package work with longtable 271 | \makeatletter 272 | \def\fnum@table{\tablename~\thetable} 273 | \makeatother 274 | $else$ 275 | % Correct order of tables after \paragraph or \subparagraph 276 | \usepackage{etoolbox} 277 | \makeatletter 278 | \patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} 279 | \makeatother 280 | % Allow footnotes in longtable head/foot 281 | \IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} 282 | \makesavenoteenv{longtable} 283 | $endif$ 284 | $endif$ 285 | $if(graphics)$ 286 | \usepackage{graphicx,grffile} 287 | \makeatletter 288 | \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} 289 | \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} 290 | \makeatother 291 | % Scale images if necessary, so that they will not overflow the page 292 | % margins by default, and it is still possible to overwrite the defaults 293 | % using explicit options in \includegraphics[width, height, ...]{} 294 | \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} 295 | % Set default figure placement to htbp 296 | \makeatletter 297 | \def\fps@figure{htbp} 298 | \makeatother 299 | $endif$ 300 | $if(links-as-notes)$ 301 | % Make links footnotes instead of hotlinks: 302 | \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} 303 | $endif$ 304 | $if(strikeout)$ 305 | \usepackage[normalem]{ulem} 306 | % Avoid problems with \sout in headers with hyperref 307 | \pdfstringdefDisableCommands{\renewcommand{\sout}{}} 308 | $endif$ 309 | \setlength{\emergencystretch}{3em} % prevent overfull lines 310 | \providecommand{\tightlist}{% 311 | \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} 312 | $if(numbersections)$ 313 | \setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} 314 | $else$ 315 | \setcounter{secnumdepth}{-\maxdimen} % remove section numbering 316 | $endif$ 317 | 318 | % 319 | % When using babel or polyglossia with biblatex, loading csquotes is recommended 320 | % to ensure that quoted texts are typeset according to the rules of your main language. 321 | % 322 | \usepackage{csquotes} 323 | 324 | % 325 | % blockquote 326 | % 327 | \definecolor{blockquote-border}{RGB}{221,221,221} 328 | \definecolor{blockquote-text}{RGB}{89,89,89} 329 | \usepackage{mdframed} 330 | \newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} 331 | \renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% 332 | \item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} 333 | 334 | % 335 | % Source Sans Pro as the de­fault font fam­ily 336 | % Source Code Pro for monospace text 337 | % 338 | % 'default' option sets the default 339 | % font family to Source Sans Pro, not \sfdefault. 340 | % 341 | $if(mainfont)$ 342 | $else$ 343 | \usepackage[default]{sourcesanspro} 344 | \usepackage{sourcecodepro} 345 | 346 | % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 347 | % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the 348 | % fix is still unreleased. 349 | % TODO: Remove this workaround when the new version of sourcecodepro is reelased on CTAN. 350 | \ifxetex 351 | \makeatletter 352 | \defaultfontfeatures[\ttfamily] 353 | { Numbers = \sourcecodepro@figurestyle, 354 | Scale = \SourceCodePro@scale, 355 | Extension = .otf } 356 | \setmonofont 357 | [ UprightFont = *-\sourcecodepro@regstyle, 358 | ItalicFont = *-\sourcecodepro@regstyle It, 359 | BoldFont = *-\sourcecodepro@boldstyle, 360 | BoldItalicFont = *-\sourcecodepro@boldstyle It ] 361 | {SourceCodePro} 362 | \makeatother 363 | \fi 364 | $endif$ 365 | 366 | $if(beamer)$ 367 | $else$ 368 | $if(block-headings)$ 369 | % Make \paragraph and \subparagraph free-standing 370 | \ifx\paragraph\undefined\else 371 | \let\oldparagraph\paragraph 372 | \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} 373 | \fi 374 | \ifx\subparagraph\undefined\else 375 | \let\oldsubparagraph\subparagraph 376 | \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} 377 | \fi 378 | $endif$ 379 | $endif$ 380 | $if(pagestyle)$ 381 | \pagestyle{$pagestyle$} 382 | $endif$ 383 | $for(header-includes)$ 384 | $header-includes$ 385 | $endfor$ 386 | $if(lang)$ 387 | \ifxetex 388 | % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) 389 | \usepackage{polyglossia} 390 | \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} 391 | $for(polyglossia-otherlangs)$ 392 | \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} 393 | $endfor$ 394 | \else 395 | \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} 396 | $if(babel-newcommands)$ 397 | $babel-newcommands$ 398 | $endif$ 399 | \fi 400 | $endif$ 401 | $if(dir)$ 402 | \ifxetex 403 | % Load bidi as late as possible as it modifies e.g. graphicx 404 | \usepackage{bidi} 405 | \fi 406 | \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex 407 | \TeXXeTstate=1 408 | \newcommand{\RL}[1]{\beginR #1\endR} 409 | \newcommand{\LR}[1]{\beginL #1\endL} 410 | \newenvironment{RTL}{\beginR}{\endR} 411 | \newenvironment{LTR}{\beginL}{\endL} 412 | \fi 413 | $endif$ 414 | $if(natbib)$ 415 | \usepackage[$natbiboptions$]{natbib} 416 | \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} 417 | $endif$ 418 | $if(biblatex)$ 419 | \usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} 420 | $for(bibliography)$ 421 | \addbibresource{$bibliography$} 422 | $endfor$ 423 | $endif$ 424 | 425 | $if(title)$ 426 | \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} 427 | $endif$ 428 | $if(subtitle)$ 429 | $if(beamer)$ 430 | $else$ 431 | \usepackage{etoolbox} 432 | \makeatletter 433 | \providecommand{\subtitle}[1]{% add subtitle to \maketitle 434 | \apptocmd{\@title}{\par {\large #1 \par}}{}{} 435 | } 436 | \makeatother 437 | $endif$ 438 | \subtitle{$subtitle$} 439 | $endif$ 440 | $if(author)$ 441 | \author{$for(author)$$author$$sep$ \and $endfor$} 442 | $endif$ 443 | \date{$date$} 444 | $if(beamer)$ 445 | $if(institute)$ 446 | \institute{$for(institute)$$institute$$sep$ \and $endfor$} 447 | $endif$ 448 | $if(titlegraphic)$ 449 | \titlegraphic{\includegraphics{$titlegraphic$}} 450 | $endif$ 451 | $if(logo)$ 452 | \logo{\includegraphics{$logo$}} 453 | $endif$ 454 | $endif$ 455 | 456 | \begin{document} 457 | $if(has-frontmatter)$ 458 | \frontmatter 459 | $endif$ 460 | $if(title)$ 461 | $if(beamer)$ 462 | \frame{\titlepage} 463 | $else$ 464 | \maketitle 465 | $endif$ 466 | $if(abstract)$ 467 | \begin{abstract} 468 | $abstract$ 469 | \end{abstract} 470 | $endif$ 471 | $endif$ 472 | 473 | $for(include-before)$ 474 | $include-before$ 475 | 476 | $endfor$ 477 | $if(toc)$ 478 | $if(toc-title)$ 479 | \renewcommand*\contentsname{$toc-title$} 480 | $endif$ 481 | $if(beamer)$ 482 | \begin{frame} 483 | $if(toc-title)$ 484 | \frametitle{$toc-title$} 485 | $endif$ 486 | \tableofcontents[hideallsubsections] 487 | \end{frame} 488 | $else$ 489 | { 490 | $if(colorlinks)$ 491 | \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} 492 | $endif$ 493 | \setcounter{tocdepth}{$toc-depth$} 494 | \tableofcontents 495 | } 496 | $endif$ 497 | $endif$ 498 | $if(lot)$ 499 | \listoftables 500 | $endif$ 501 | $if(lof)$ 502 | \listoffigures 503 | $endif$ 504 | $if(linestretch)$ 505 | \setstretch{$linestretch$} 506 | $endif$ 507 | $if(has-frontmatter)$ 508 | \mainmatter 509 | $endif$ 510 | $body$ 511 | 512 | $if(has-frontmatter)$ 513 | \backmatter 514 | $endif$ 515 | $if(natbib)$ 516 | $if(bibliography)$ 517 | $if(biblio-title)$ 518 | $if(has-chapters)$ 519 | \renewcommand\bibname{$biblio-title$} 520 | $else$ 521 | \renewcommand\refname{$biblio-title$} 522 | $endif$ 523 | $endif$ 524 | $if(beamer)$ 525 | \begin{frame}[allowframebreaks]{$biblio-title$} 526 | \bibliographytrue 527 | $endif$ 528 | \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} 529 | $if(beamer)$ 530 | \end{frame} 531 | $endif$ 532 | 533 | $endif$ 534 | $endif$ 535 | $if(biblatex)$ 536 | $if(beamer)$ 537 | \begin{frame}[allowframebreaks]{$biblio-title$} 538 | \bibliographytrue 539 | \printbibliography[heading=none] 540 | \end{frame} 541 | $else$ 542 | \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ 543 | $endif$ 544 | 545 | $endif$ 546 | $for(include-after)$ 547 | $include-after$ 548 | 549 | $endfor$ 550 | \end{document} 551 | -------------------------------------------------------------------------------- /pandoc/templates/preamble.tex: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%color 2 | \definecolor{UBCblue}{rgb}{0.04706, 0.13725, 0.26667} % UBC Blue (primary) 3 | \definecolor{UBCgrey}{rgb}{0.3686, 0.5255, 0.6235} % UBC Grey (secondary) 4 | 5 | \definecolor{orange}{RGB}{244,167,66} 6 | 7 | \setbeamercolor{palette primary}{bg=UBCblue,fg=white} 8 | \setbeamercolor{palette secondary}{bg=UBCblue,fg=white} 9 | \setbeamercolor{palette tertiary}{bg=UBCblue,fg=white} 10 | \setbeamercolor{palette quaternary}{bg=UBCblue,fg=white} 11 | \setbeamercolor{structure}{fg=UBCblue} % itemize, enumerate, etc 12 | \setbeamercolor{section in toc}{fg=UBCblue} % TOC sections 13 | 14 | %% change circle miniframes color 15 | \setbeamercolor{mini frame}{fg=orange, bg=UBCblue} 16 | 17 | %% Change subsection in footer color (author and institute color) 18 | \setbeamercolor{subsection in head/foot}{bg=UBCgrey,fg=white} 19 | 20 | %change ilmenau section dot color 21 | \setbeamercolor{section in head/foot}{fg=orange} 22 | 23 | %% Change the circle in miniframes to a box 24 | %\setbeamertemplate{mini frame}[box] 25 | %\setbeamertemplate{mini frame in current subsection}[box] 26 | 27 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 28 | %%%% Create framenumber in footer 29 | \newcommand{\frameofframes}{/} 30 | \newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}} 31 | 32 | \setframeofframes{of} 33 | \makeatletter 34 | \setbeamertemplate{footline} 35 | {% 36 | \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} 37 | \end{beamercolorbox} 38 | \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% 39 | leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}% 40 | \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}% 41 | \hfill% 42 | {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}% 43 | \end{beamercolorbox}% 44 | \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% 45 | leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}% 46 | {\usebeamerfont{title in head/foot}\insertshorttitle}% 47 | \hfill% 48 | {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber} 49 | \end{beamercolorbox}% 50 | \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} 51 | \end{beamercolorbox} 52 | } 53 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 54 | %%% Remove subsection bar in mini frames 55 | \defbeamertemplate*{headline}{miniframes theme no subsection} 56 | {% 57 | \begin{beamercolorbox}[colsep=1.5pt]{upper separation line head} 58 | \end{beamercolorbox} 59 | \begin{beamercolorbox}{section in head/foot} 60 | \vskip2pt\insertnavigation{\paperwidth}\vskip2pt 61 | \end{beamercolorbox}% 62 | \begin{beamercolorbox}[colsep=1.5pt]{lower separation line head} 63 | \end{beamercolorbox} 64 | } 65 | 66 | \setbeamertemplate{footline}[miniframes theme no subsection] 67 | %%%%%%%%%%%%%%%%%%%%%%%%%%% 68 | \makeatother 69 | -------------------------------------------------------------------------------- /presentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "My wonderful presentation" 3 | author: "Alexey Gumirov" 4 | institute: "My home office" 5 | topic: "Pandoc how-to" 6 | theme: "Frankfurt" 7 | colortheme: "beaver" 8 | fonttheme: "professionalfonts" 9 | mainfont: "Hack Nerd Font" 10 | fontsize: 11pt 11 | urlcolor: red 12 | linkstyle: bold 13 | aspectratio: 169 14 | titlegraphic: img/aleph0.png 15 | logo: img/aleph0-small.png 16 | date: 17 | section-titles: false 18 | toc: true 19 | --- 20 | 21 | # General information 22 | 23 | ## Themes, fonts, etc. 24 | 25 | - I use default **pandoc** themes. 26 | - This presentation is made with **Frankfurt** theme and **beaver** color theme. 27 | - I like **professionalfonts** font scheme. 28 | 29 | ## Links 30 | 31 | - Matrix of beamer themes: [https://hartwork.org/beamer-theme-matrix/](https://hartwork.org/beamer-theme-matrix/) 32 | - Font themes: [http://www.deic.uab.es/~iblanes/beamer_gallery/index_by_font.html](http://www.deic.uab.es/~iblanes/beamer_gallery/index_by_font.html) 33 | - Nerd Fonts: [https://nerdfonts.com](https://nerdfonts.com) 34 | 35 | # Formatting 36 | ## Text formatting 37 | 38 | Normal text. 39 | *Italic text* and **bold text**. 40 | ~~Strike out~~ is supported. 41 | 42 | ## Notes 43 | 44 | > This is a note. 45 | > > Nested notes are not supported. 46 | > And it continues. 47 | 48 | ## Blocks 49 | 50 | ### This is a block A 51 | 52 | - Line A 53 | - Line B 54 | 55 | ### 56 | 57 | New block without header. 58 | 59 | ### This is a block B. 60 | 61 | - Line C 62 | - Line D 63 | 64 | ## Listings 65 | 66 | Listings out of the block. 67 | 68 | ```sh 69 | #!/bin/bash 70 | echo "Hello world!" 71 | echo "line" 72 | ``` 73 | ### Listings in the block. 74 | 75 | ```sh 76 | #!/bin/bash 77 | echo "Hello world!" 78 | echo "line" 79 | ``` 80 | 81 | ## Table 82 | 83 | **Item** | **Description** | **Q-ty** 84 | :--------|-----------------:|:---: 85 | Item A | Item A description | 2 86 | Item B | Item B description | 5 87 | Item C | N/A | 100 88 | 89 | ## Single picture 90 | 91 | This is how we insert picture. Caption is produced automatically from the alt text. 92 | 93 | ``` 94 | ![Aleph 0](img/aleph0.png) 95 | ``` 96 | 97 | ![Aleph 0](img/aleph0.png) 98 | 99 | ## Two or more pictures in a raw 100 | 101 | Here are two pictures in the raw. We can also change two pictures size (height or width). 102 | 103 | ### 104 | ``` 105 | ![](img/aleph0.png){height=10%}\ ![](img/aleph0.png){height=30%} 106 | ``` 107 | 108 | ![](img/aleph0.png){ height=10% }\ ![](img/aleph0.png){ height=30% } 109 | 110 | ## Lists 111 | 112 | 1. Idea 1 113 | 2. Idea 2 114 | - genius idea A 115 | - more genius 2 116 | 3. Conclusion 117 | 118 | 119 | ## Two columns of equal width 120 | 121 | ::: columns 122 | 123 | :::: column 124 | 125 | Left column text. 126 | 127 | Another text line. 128 | 129 | :::: 130 | 131 | :::: column 132 | 133 | - Item 1. 134 | - Item 2. 135 | - Item 3. 136 | 137 | :::: 138 | 139 | ::: 140 | 141 | ## Two columns of with 40:60 split 142 | 143 | ::: columns 144 | 145 | :::: {.column width=40%} 146 | 147 | Left column text. 148 | 149 | Another text line. 150 | 151 | :::: 152 | 153 | :::: {.column width=60%} 154 | 155 | - Item 1. 156 | - Item 2. 157 | - Item 3. 158 | 159 | :::: 160 | 161 | ::: 162 | 163 | ## Three columns with equal split 164 | 165 | ::: columns 166 | 167 | :::: column 168 | 169 | Left column text. 170 | 171 | Another text line. 172 | 173 | :::: 174 | 175 | :::: column 176 | 177 | Middle column list: 178 | 179 | 1. Item 1. 180 | 2. Item 2. 181 | 182 | :::: 183 | 184 | :::: column 185 | 186 | Right column list: 187 | 188 | - Item 1. 189 | - Item 2. 190 | 191 | :::: 192 | 193 | ::: 194 | 195 | ## Three columns with 30:40:30 split 196 | 197 | ::: columns 198 | 199 | :::: {.column width=30%} 200 | 201 | Left column text. 202 | 203 | Another text line. 204 | 205 | :::: 206 | 207 | :::: {.column width=40%} 208 | 209 | Middle column list: 210 | 211 | 1. Item 1. 212 | 2. Item 2. 213 | 214 | :::: 215 | 216 | :::: {.column width=30%} 217 | 218 | Right column list: 219 | 220 | - Item 1. 221 | - Item 2. 222 | 223 | :::: 224 | 225 | ::: 226 | 227 | ## Two columns: image and text 228 | 229 | ::: columns 230 | 231 | :::: column 232 | 233 | ![](img/aleph0.png){height=50%} 234 | 235 | :::: 236 | 237 | :::: column 238 | 239 | Text in the right column. 240 | 241 | List from the right column: 242 | 243 | - Item 1. 244 | - Item 2. 245 | :::: 246 | 247 | ::: 248 | 249 | ## Two columns: image and table 250 | 251 | ::: columns 252 | 253 | :::: column 254 | 255 | ![](img/aleph0.png){height=50%} 256 | 257 | :::: 258 | 259 | :::: column 260 | 261 | | **Item** | **Option** | 262 | |:---------|:----------:| 263 | | Item 1 | Option 1 | 264 | | Item 2 | Option 2 | 265 | 266 | :::: 267 | 268 | ::: 269 | 270 | ## Fancy layout 271 | 272 | ### Proposal 273 | 274 | - Point A 275 | - Point B 276 | 277 | ::: columns 278 | 279 | :::: column 280 | 281 | ### Pros 282 | 283 | - Good 284 | - Better 285 | - Best 286 | 287 | :::: 288 | 289 | :::: column 290 | 291 | ### Cons 292 | 293 | - Bad 294 | - Worse 295 | - Worst 296 | 297 | :::: 298 | 299 | ::: 300 | 301 | ### Conclusion 302 | 303 | - Let's go for it! 304 | - No way we go for it! 305 | -------------------------------------------------------------------------------- /presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/presentation.pdf -------------------------------------------------------------------------------- /presentation_nice_formatting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexeygumirov/pandoc-beamer-how-to/6de85bb6d151113d0935d8d5b7f9263e1e7dfc00/presentation_nice_formatting.pdf --------------------------------------------------------------------------------