From within a code chunk I’d like to write text with one or more whitespace between words. The Rmarkdown output is Word document. The use of cat()
and
has worked well, but unwanted hyperlinks are created in the following case:
title: ”
output: word_document
cat("Notes: ")
cat("notes: ")
cat("Notes: For the")
cat("Note: For the")
In the Word output this produces:
*Notes: ; *formatted as hyperlink, note the addition of semicolon
notes: ; also hyperlink, it preserves the two spaces but still adds semicolon
Notes: For the the number of whitespaces is correct and there is no added semicolon, but it’s still an hyperlink
Note: For the this last case shows that all works well if you just use a slightly different word
How do I achieve Notes: For the without creating hyperlinks and without the semicolon addition? I already disabled the Word option that automatically formats paths as hyperlinks. Why is this particular word creating this behaviour and are there other words that would also do this?
stepix is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.