R Markdown Bullet List with Multiple Levels

72,066

Solution 1

For each sub-level instead of one tab, include two:

* unordered list
    + sub-item 1 
    + sub-item 2 
        - sub-sub-item 1

Output:

enter image description here

Solution 2

See the Pandoc documentation under Block content in list items.

Share:
72,066
stackinator
Author by

stackinator

Updated on July 09, 2022

Comments

  • stackinator
    stackinator almost 2 years

    https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf

    The cheat sheet above lists the following syntax to generate a bulleted list in R Markdown. * is the primary solid bullet. + is a secondary hollow bullet. And - is a tertiary solid square.

    * unordered list + sub-item 1 + sub-item 2 - sub-sub-item 1

    After I render the output with knitr I don't get the expected output. I get what's shown below. The second and third lines are not indented. Only the very last line is indented, and only one indent instead of the expected two. And all bullets are the secondary hollow style. It's as if I put the following syntax into R Studio, but I didn't.

    + unordered list + sub-item 1 + sub-item 2 + sub-sub-item 1

    How do I get what I intended, the first chunk of pasted syntax?