使用 bookdown 时正确缩进列表项中的段落

Properly indent paragraphs within list items when using bookdown

如何正确缩进 bookdown 列表中的段落?我想在空行之后开始一个新段落,如下例所示。此示例在 bookdown 之外使用时适用于 RMarkdown,但在与 bookdown 包一起使用时会崩溃。


  1. 第一个排序的列表项

    您可以在列表项中正确缩进段落。请注意上面的空白行和前导空格(至少一个,但我们将在此处使用三个来对齐原始 Markdown)。

  2. 另一项

    • 未排序的子列表。
  3. 实际数字并不重要,重要的是它是一个数字
    1. 已排序的子列表
  4. 还有一个项目。

如果我将以下代码呈现为 pdf,那么我会得到上面列出的输出。注意间距和白色 space。在数字之后有两个 space(用于完整缩进 4)。项目符号后有三个 spaces.

1.  First ordered list item

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

2.  Another item

    *   Unordered sub-list.

3.  Actual numbers don't matter, just that it's a number

    1.  Ordered sub-list

4.  And another item.

结果是这样的