Lists

Pandoc does not allow easy customization of ordered or unordered lists. This option allows you to apply a list style for ordered lists and a list style for unordered lists. These list styles must be present in the reference_docx document.

How it works

It will be necessary to create or re-use a Microsoft Word document that will be used as template (ex: “template.docx”) that contains the lists definitions. In this document, you have to create two new list styles, one for ordered lists and one for unordered lists. This template will be used as a reference document for the customization of your list style with R Markdown. In the YAML header of your R Markdown document, this corresponds to reference_docx: template.docx.

Usage

To use the style definition located in reference_docx, specify ol.style and or ul.style in the yaml header of you R Markdown document:

# officedown yaml header
output: 
  officedown::rdocx_document:
    reference_docx: template.docx
    lists:
      ol.style: 'Default ol'
      ul.style: 'Default ul'

Global settings

These parameters are global to the R Markdown document. They override the styles of all ordered and unordered lists. They cannot be used for a single particular list in the document.

How to create a Word list style

For a much more detailled explanation, read this article: https://www.howtogeek.com/355561/how-to-create-and-work-with-multilevel-lists-in-microsoft-word/

To create a list style in your reference_docx corresponding to your needs, edit the document with MS Word and add a new style of type “list”.

The style name will be set to “ol.style” argument if you configure an ordered list (i.e. with numbers corresponding to each level) or to “ul.style” argument if you configure an unordered list (i.e. with bullets corresponding to each level).

You should see a window that looks like one of the two below:

In the Define New List Style window, start give your new style a name (“Default ol” in the example). There are a many formatting options available in this window. You can change the font, define the character formatting and choose the type (number or bullet).