Mehmet Yildirim
Mehmet Yildirim

Reputation: 501

How to create an automatic nested list and sub-lists with letters and/or Roman numerals in R-markdown?

I am trying to generate a nested list with numbers, letters, and Roman numerals. R-Markdown cheatsheet shows

  1. ordered list
  2. item 2
    • sub-item 1
    • sub-item 2

but, this generates a sub-list with an unordered bullet. Instead of this, I need sub-list with letters and sub-sub-lists with Roman numerals like this:

1. What geoms would you use to draw the followings?
   a. A line chart
      i) `geom_line()`
   b. A boxplot
      ii) `geom_boxplot()`

Is there any way to do this? Thank you,

Upvotes: 3

Views: 2117

Answers (1)

Mehmet Yildirim
Mehmet Yildirim

Reputation: 501

Luckily, I have found the answer to my question in another R-Markdown cheatsheet. The point is to put 4 spaces or 2 indents before the sub-list items and 8 spaces or 4 indents before the sub-sub-list items. The following is my code in R-Markdown:

1. What geoms would you use to draw the followings?
    a. A line chart
        i. `geom_bar()`
        i. `geom_line()`
    a. A boxplot  
        i. `geom_boxplot()`
        i. box
    a. A histogram: `geom_histogram()`
    a. An area chart: `geom_area()`

The output is like this:

1. What geoms would you use to draw the followings?
    a. A line chart
        i. `geom_bar()`
        ii. `geom_line()`
    b. A boxplot  
        iii. `geom_boxplot()`
        iv. box
    c. A histogram: `geom_histogram()`
    d. An area chart: `geom_area()`

Upvotes: 1

Related Questions