I’ve recently gotten started with using Beamer in RMarkdown (RMD). Some of the Beamer advice is for those using Latex or other programs directly, so I thought I would share how to incorporate some minor template changes for things such as bullet points when working with Beamer in RMarkdown.
First, let’s create a 3-level nested list in the RMD file itself:
Make sure to put 4 spaces before a sub-item’s symbol, and 4+4 spaces before a sub-sub-item’s symbol.
This outputs as all triangles:
To change the bullet point style:
We can make Latex commands to set the style, but we must put these in the RMD header section, under “header-includes:” as follows:
To produce:
For more symbols, try substituting in “\square”, “\circle”, “\ball”, and so on, between the $ signs. The escape backslash is needed if using Latex symbols, but literal text you wish to use as a bullet point symbol (“X”, “o”, “>>”) can be inserted without a backslash.
Done!
(You can also take out the command).
Solution patched together from (https://latex-beamer.com/faq/bullet-style/) (Latex); (https://stackoverflow.com/questions/59741387/specify-innertheme-for-an-rmarkdown-beamer-presentation) (RMarkdown integration of Latex commands).
What are the options for the bullet point symbols?
Your options for the bullet point symbols are:
- Common Beamer options seem to be: “\triangle”, “\circle”, “\square”, “\diamond”, and “\ball”. For filled-in symbols, try “\blacksquare”, “\blacktriangle”, “\blacklozenge”, and so on. (The filled-in colour will depend on the theme). “\default” can be used to replace a theme’s bullet points back to RMD/Beamer defaults.
- Any Latex character. “\Longrightarrow”, “\Rightarrow”, “\Omega”, “\gg”, “\infty”, “\bowtie”, and so on. A full list is here: https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols.
- Any literal text within the dollar sign marks. Do not put the escape backslash.
- Wingdings glyphs. You will need to insert the line ” - \usepackage:{pifont}” into the header to access the Wingding symbols via Latex package ‘pifont’. See below for an implementation. Wingding symbols have an escape slash, but no $ signs around them.
Using Wingdings symbols as bullet points
You will need to edit the header as follows:
For output:
Some more variations:
Code to copy:
---
: "Nested List Blog Post"
title: "Catherine Moez"
author: "May 23, 2023"
date: beamer_presentation
output-includes:
header- \setbeamertemplate{itemize item}{\scriptsize$\blacksquare$}
- \setbeamertemplate{itemize subitem}{\scriptsize$\blacklozenge$}
- \setbeamertemplate{itemize subsubitem}{\scriptsize$\blacktriangle$}
---