Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incremental nested lists in rmarkdown

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 
like image 886
jebyrnes Avatar asked Apr 26 '16 13:04

jebyrnes


People also ask

How do you make a nested list in Markdown?

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.

How do I make a Bulletlist in R markdown?

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.

How do you make a nested list?

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.

How do you indent a Bulletlist Markdown?

Lists can normally be nested in Markdown, by using two (2) spaces to indent per level of nesting.


1 Answers

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.

like image 75
Alex Avatar answered Sep 20 '22 18:09

Alex