Incremental nested lists in rmarkdown

前端 未结 4 631
感情败类
感情败类 2021-01-03 21:18

I\'ve been working in RMarkdown to make some slide sets, and have discovered odd behavior with respect to nested lists and mixing of list types. The following short presenta

相关标签:
4条回答
  • 2021-01-03 22:03

    As @Alex mentioned you have to give it 4 spaces. If you don't want to worry about this in the future you can set the tab preset to be 4 spaces. the solution will be

    *something <space><space><space><space>+ Other thing

    0 讨论(0)
  • 2021-01-03 22:05

    Worked when I gave 2 tabs, so:

    1. This
    <tab><tab>+ Should work
    
    0 讨论(0)
  • 2021-01-03 22:13

    I was having the same problem and found a solution that worked. When making nested lists without incremental reveal, you need to add four spaces for sub-bullets. When making lists with incremental reveal, you need to add one space after >. So, when making sub-bullets with incremental reveal, you need five spaces between > and - (one for the incremental syntax, and four for the nested list syntax).

    So, a regular list with incremental reveal would look like this:

    ><space>- Point 1
    ><space>- Point 2
    

    If you want to add sub-bullets, this will not work:

    ><space>- Point 1
    ><space><space><space><space>- Sub-bullet
    ><space>- Point 2
    

    But this will work:

    ><space>- Point 1
    ><space><space><space><space><space>- Sub-bullet
    ><space>- Point 2
    

    Hope this is helpful/readable!

    0 讨论(0)
  • 2021-01-03 22:17

    Try inserting four leading spaces. From the documentation (emphasis mine):

    The four-space rule

    A list item may contain multiple paragraphs and other block-level content. However, subsequent paragraphs must be preceded by a blank line and indented four spaces or a tab. The list will look better if the first paragraph is aligned with the rest:

    The inconsistency to do with number of tabs may be due to how many spaces are inserted by default by Rstudio.

    0 讨论(0)
提交回复
热议问题