Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Properly indent paragraphs within list items when using bookdown

Tags:

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.
like image 237
user2633313 Avatar asked Aug 04 '18 13:08

user2633313


People also ask

What is the correct indent for a paragraph?

Paragraph indentation Indent the first line of each paragraph of text 0.5 in. from the left margin. Use the tab key or the automatic paragraph-formatting function of your word-processing program to achieve the indentation (the default setting is likely already 0.5 in.). Do not use the space bar to create indentation.

How do you indent text in RMD?

Text can be indented two ways depending on if the indent is within a list or not. Within a list, four spaces at the begin of the line indicates the text is to be indented one nesting level. Use four additional spaces for each additional nesting level. To indent text which is not in a list, use a block quote.

How do you indent an entire paragraph in HTML?

Use margin-left if you want the entire paragraph to be shifted to the right. If you want the entire paragraph to be shifted over, not just the first line, then you can use the margin-left property.

How many spaces is an indent?

Standard paragraph indentation is about five spaces or one-quarter to one-half of an inch, depending on which style guide you follow. In online writing, if your software doesn't allow indentation, insert a line space to indicate a new paragraph.


1 Answers

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

like image 55
ekstroem Avatar answered Sep 28 '22 18:09

ekstroem