I'm trying to add line breaks using body_replace_all_text
or body_add_par
but am having no joy. Using \r\n
shows correctly in OSX TextEdit, but not in Word.
An example:
library(officer)
library(tidyverse)
read_docx() %>%
body_add_par("Oneline\r\n\r\nAnother line") %>%
print(target = "example.docx")
is there a right way to do this?