Search code examples
rlatexr-markdownbeamer

How to increase distance between bullet points in R Markdown?


I'm trying to increase the distance between bullet points in R Markdown unsuccessfully. I've tried enumitem and a few other changes with no success.

Here is a workable code:

---
title: "Title"
date: "`r Sys.Date()`"
author: "Author"
output: beamer_presentation
---

## Slide 1

- Bullet point 1
- Bullet point 2

And you should get this:

slides example

The idea is to increase the space between Bullet point 1 and Bullet point 2.

Any ideas? Thanks!


Solution

  • For ordinary beamer documents one can increase the space between items with

    \usepackage{xpatch}
    \xpatchcmd{\itemize}
      {\def\makelabel}
      {\setlength{\itemsep}{5ex}\def\makelabel}
      {}
      {}
    

    rmarkdown uses beamer in a very strange way, but it can be hacked like this:

    ---
    title: "Title"
    date: "`r Sys.Date()`"
    author: "Author"
    output:
      beamer_presentation:
        keep_tex: true
    header-includes:
      - \renewcommand{\tightlist}{\setlength{\itemsep}{5ex}\setlength{\parskip}{0pt}}
    ---
    
    ## Slide 1
    
    - Bullet point 1
    - Bullet point 2
    

    enter image description here