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 presentation only works for slide 2. Nested lists are no longer nested and mixing incremental ordered and unordered lists fails entirely. I've tried this with a few different presentation formats, and it actually fails differently for different output types, which was surprising.
Thoughts?
--- title: "Attempt" output: revealjs::revealjs_presentation --- ## Nested Incremental Lists > * This > + kinda works (but is not nested) ## Incremental Ordered Lists > 1. This > 2. works ## Broken - Nested mixed lists > 1. This > + Does not work
To nest one list within another, indent each item in the sublist by four spaces. You can also nest other elements like paragraphs, blockquotes or code blocks. You can mix ordered and unordered lists. To nest a paragraph or blockquote, indent by either 4 spaces or one tab.
To make a bulleted-list in R Markdown , a series of lines are prefaced with an asterisk in exactly the manner as in a plain-text email (See Figure 1). Thus, students can learn to use R Markdown without the burden of learning a wholly new technology, such as L A TEX or HTML.
First, we'll create a nested list by putting an empty list inside of another list. Then, we'll create another nested list by putting two non-empty lists inside a list, separated by a comma as we would with regular list elements.
Lists can normally be nested in Markdown, by using two (2) spaces to indent per level of nesting.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With