_       _       
  (_) ___ | |_ ____
  | |/ _ \| __|_  /
  | | (_) | |_ / / 
 _/ |\___/ \__/___|
|__/               

Yet more presentations with pandoc and beamer

I finally got sans serif fonts working in Beamer / pandoc by switching to the xetex/xelatex as the pdf engine used by pandoc. To use it, I had to install the texlive-xetex package, which was only about 18 MB.

sudo apt install texlive-xetex

Note: To check what packages were already installed, I used this command:

apt list --installed | grep texlive

To compile the presentation from the markdown file "pres.md", I used the following command:

pandoc --pdf-engine xelatex -t beamer pres.md -o pres.pdf

This is my "pres.md":

---
title: My Example Beamer Presentation
author: Ted Burke
date: 3-Dec-2022
theme: default
colortheme: default
header-includes:
- \setbeamercolor{normal text}{fg=black,bg=yellow!15}
mainfont: DejaVu Sans
...

# What is this presentation about?

- Pandoc - Wikipedia describes Pandoc as "a free-software document converter, widely used as a writing tool (especially by scholars) and as a basis for publishing workflows."
- Beamer - Wikipedia describes Beamer as "a LaTeX document class for creating presentation slides, with a wide range of templates and a set of features for making slideshow effects."

# A slide with an image

![Cat and dog](catdog.jpg)

# Some example code

\tiny
~~~{.cpp}
#include <stdio.h>

int main()
{
    printf("Hello.\n");

    return 0;
}

#include <stdio.h>

int main()
{
    printf("Hello.\n");

    return 0;
}

#include <stdio.h>

int main()
{
    printf("Hello.\n");

    return 0;
}
~~~
\normalsize

# A slide with columns

This slide has some columns...

::: columns

:::: column

A list of items:

- One
- Three
- Two

::::

:::: column
![Cat and dog](catdog.jpg)
::::

:::

# Some slides are text-heavy

- This is quite a long and unwieldy sentence to have included in a bullet point in a presentation, especially since it adds little of value.
- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

# Displaying images

![Cat with laptop](cattop.jpg){ width=50% }

# Displaying images

![Cat and bird](catbird.jpg)

# Favourite 1980s bands

- Cocteau Twins 
- New Order
- The Cure
- Talk Talk

# Equations 

The roots, $r_1$ and $r_2$ of a quadratic equation $ax^2 + bx + c = 0$ can be found using the following formula.

$$r_{1,2} = \frac{-b \pm \sqrt{b^2-4ac}}{2a}$$

# Another equation 

Here's another more complicated equation:

$$ \frac{x^n + y^n}{x^n - y^{\frac{1}{n}}} = \int_0^\pi z^n dz $$