Properly indent paragraphs within list items when using bookdown
Asked Answered
C

1

6

How do I properly indent paragraphs within lists in bookdown? I would like to start a new paragraph after a blank line as show in the example below. This example works for RMarkdown when used outside of bookdown but breaks down when used with the bookdown pacakage.


  1. First ordered list item

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

  2. Another item

    • Unordered sub-list.
  3. Actual numbers don't matter, just that it's a number
    1. Ordered sub-list
  4. And another item.
Candlelight answered 4/8, 2018 at 13:49 Comment(2)
Can you please format your post such that your input is visible? Right now SO’s markdown interpreter interferes.Lorrettalorri
Hi Ralf, I really do not know how to do this. What I asking for is how to make the text in bookdown look like that one above (look at the blank line after item number 1 followed by a properly indented new paragraph). All you need is a blank line before the start of the paragraph, and that the first line in the new paragraph is preceded by three spaces in Rmarkdown. Does not work in bookdown though.Candlelight
H
5

If I render the following code to pdf then I get the output you listed above. Note the spacing and white space. After the numbers there are two spaces (for a full indent of 4). After the bullet there are three spaces.

1.  First ordered list item

    You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

2.  Another item

    *   Unordered sub-list.

3.  Actual numbers don't matter, just that it's a number

    1.  Ordered sub-list

4.  And another item.

The result looks like this

enter image description here

Hyssop answered 5/8, 2018 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.