I am using R
and markdown
and the bookdown
package to write word documents.
I have a template file with very specific custom styles for the headline and the user expects the headlines to be in this specific style.
How can I change the default headline style when writing the word document. As defined here in the pandoc manual under --reference-doc, The default level one headline style will be Heading 1
. I want to use Custom Headline 1
instead.
It has to be the different style, so just adapting the template.docx
so the headlines look the same as the preferred style is not an option.
How can I change this default behaviour?
Or are there ways to later modify the created docx
document and rename all the Heading x
styles into Custom Headline x
?
So far I found this SO question pandoc - replace heading with custom style for Word docx which looks like it is doing what I am looking for. Searching further for R solutions, I found the package pandocfilters
, but I don't see how to use it to change the style of the specific headline.