How do I create an incremental list with nonincremental nested list in rmarkdown / pandoc?

70 views Asked by At

I am creating a beamer presentation using rmarkdown. I want the top-level bullets (on some slides) to increment but the sub-bullets to appear with the top-level bullets.

How do I achieve this, ideally without having to resort to latex code in the markdown document?

Various attempts below. The closest I've got uses a pause (i.e. dots) but it adds a paragraph break between the top-level bullets, which I don't want (and which I again don't want to fix with latex code).

Any ideas?

## Attempt 1: all incremental

>- First item
>- Second item
    * First sub-item
    * Second sub-item

## Attempt 2 (extra space): all incremental

>- First item
>- Second item
    * First sub-item
    * Second sub-item

## Attempt 3 (even more space): all incremental

> - First item
> - Second item
     * First sub-item
     * Second sub-item

## Attempt 4: all incremental

>- First item
>- Second item
>    * First sub-item
>    * Second sub-item


## Attempt 5: all incremental

::: incremental

- First item
- Second item
  * First sub-item
  * Second sub-item

::: 

## Attempt 6: non-incremental

::: incremental

- First item

::: 

- Second item
  * First sub-item
  * Second sub-item

## Attempt 7: non-incremental

- First item
. . . 
- Second item
  * First sub-item
  * Second sub-item

## Attempt 8: appears correctly but too big a gap between first and second item

- First item

. . . 

- Second item
  * First sub-item
  * Second sub-item

## Attempt 9 (two spaces at end of line): appears correctly but too big a gap between first and second item

- First item  
  
. . .  
  
- Second item
  * First sub-item
  * Second sub-item
1

There are 1 answers

0
samcarter_is_at_topanswers.xyz On

With just a tiny bit of latex code:

---
output:
  beamer_presentation:
---

- First item\pause
- Second item
  * First sub-item
  * Second sub-item

enter image description here