r - 使用 bookdown 时正确缩进列表项中的段落
问题描述
如何正确缩进 bookdown 列表中的段落?我想在空行之后开始一个新段落,如下例所示。此示例在 bookdown 之外使用时适用于 RMarkdown,但在与 bookdown 包一起使用时会崩溃。
第一个有序列表项
您可以在列表项中正确缩进段落。注意上面的空白行和前导空格(至少一个,但我们将在这里使用三个来对齐原始 Markdown)。
另一个项目
- 无序的子列表。
- 实际数字无关紧要,只是一个数字
- 有序子列表
- 和另一个项目。
解决方案
如果我将以下代码呈现为 pdf,那么我会得到上面列出的输出。注意间距和空白。数字后面有两个空格(对于 4 的完整缩进)。子弹后面有三个空格。
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.
结果看起来像这样
推荐阅读
- error-handling - 如何修复 MissingPermissions 错误不起作用 | 不和谐.py
- javascript - 将图像移回开始后如何?
- c# - 如何将平面 json 对象转换为强类型对象列表
- java - JavaFX在舞台上设置图标的问题
- python - Python:将数据从 .XML 输入到 .CSV 文件
- c# - 对于简单的提取/转换/加载任务,我应该使用哪种类型的项目?
- batch-file - 可以在 FOR 循环中对文件进行排序/排序吗?
- python - 如何让 Graphviz 垂直而不是水平显示图表?
- c++ - g++ std::filesystem::last_write_time 中的重大更改
- python - 使用 Python 从 SQL Server 中的两个表中查询