r - 使用 bookdown 时在列表项中正确缩进段落

标签 r r-markdown bookdown

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

  • 第一个有序列表项

    您可以在列表项中正确缩进段落。注意上面的空行和前导空格(至少有一个,但我们将在这里使用三个来对齐原始 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.
    

    结果看起来像这样

    enter image description here

    关于r - 使用 bookdown 时在列表项中正确缩进段落,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51686244/

    相关文章:

    r - 如何将原始类型/字节写入标准输出?

    r - 如何在 R Markdown 投影仪中打印长(超过 1 页)引用书目?

    r - R中DT中的多个表格标题

    R Markdown 代码块不显示数学方程式

    r-markdown - 当 self_contained = TRUE 时,如何在 bookdown::gitbook 中正确呈现数学方程式?

    r - 在 R 中安装 MySQL 包

    r - 如何创建要插入到 ggplot 中的对象(当有多个带 + 的部分时)?

    r - Bookdown:导出到 Word 文档(文件 2[[格式]] 中的错误:尝试在 get1index 中选择少于一个元素)

    r - 使用 acast 时保持 data.frame 的排序

    html - 有条件地将视频嵌入 R-markdown (bookdown)