Starting work on supporting rmd diff rendering to word. Custom styles can be used to show differences in rendered doc (nb: this is without using the traditional track-changes option in Word). For example, this rmarkdown snippet:
---
output:
word_document:
reference_docx: rmd_reviewer_styles.docx
---
### Example Rmarkdown doc with custom styles for word
This is some text that has the [custom addition style
applied]{custom-style="addtxt"} and this was [some text that was
removed]{custom-style="deltxt"}
} else if (output_format == "word_document") {
diffout <- gsub("[-", '{custom-style="addtxt"', diffout, fixed = TRUE)
diffout <- gsub("-]", "}", diffout, fixed = TRUE)
diffout <- gsub("{+", '{custom-style="deltxt"', diffout, fixed = TRUE)
diffout <- gsub("+}", "}", diffout, fixed = TRUE)
}
and then rendered from .md -> docx via pandoc for the raw view (i.e. code chunks will not be run). Or just attempt to use the usual rmarkdown::render to word process for viewing the rendered output