如何在 rmarkdown / pandoc 中创建带有非增量嵌套列表的增量列表?

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

提问人:jms202 提问时间:11/17/2023 更新时间:11/17/2023 访问量:31

问:

我正在使用 rmarkdown 创建一个 beamer 演示文稿。我希望顶级项目符号(在某些幻灯片上)递增,但子项目符号与顶级项目符号一起出现。

我如何实现这一点,理想情况下不必求助于 markdown 文档中的乳胶代码?

下面的各种尝试。我得到的最接近的使用暂停(即点),但它在顶级项目符号之间添加了一个段落分隔符,这是我不想要的(而且我再次不想用乳胶代码修复)。

有什么想法吗?

## 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
R-Markdown Pandoc 投影仪

评论

0赞 Adesoji Alu 11/17/2023
pandoc.org/chunkedhtml-demo/10.2-incremental-lists.html .它在这里

答:

4赞 samcarter_is_at_topanswers.xyz 11/17/2023 #1

只需一点点乳胶代码:

---
output:
  beamer_presentation:
---

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

enter image description here