noamross / redoc

[NOTE: Project in suspended animation for now] Reversible Reproducible Documents
https://noamross.github.io/redoc
Other
514 stars 44 forks source link

Replace 'RPLACEHOLDER' with non-breaking space so it is invisible even when hidden characters shown. #49

Closed MattCowgill closed 5 years ago

MattCowgill commented 5 years ago

Thanks so much for this wonderful package, it's extremely useful.

When I try to knit to redoc, I get text reading 'RPLACEHOLDER' in place of R output. For example, here is the knitted skeleton redoc document:

Screen Shot 2019-06-12 at 10 01 06 am Screen Shot 2019-06-12 at 10 01 12 am

This is a mystery to me, as it is only happening on one of my computers (macOS 10.14.3). It's running Pandoc version 2.7.2, RStudio 1.2.1335, rmarkdown 1.13.1.

noamross commented 5 years ago

RPLACEHOLDER is used as, well, a placeholder for the location in the document for code that has no output, like the include=FALSE chunk or the HTML comment. It is stored as hidden text, so I think in this case you have viewing hidden text turned on in Word, (under Word > Preferences... > View > Show Non-Printing Characters > Hidden Text).

But of course this means that a collaborator who has this turned on may see RPLACEHOLDER and this would be undesirable. So I may see if I can hide it further by using a non-breaking space or other near-invisible character instead of RPLACEHOLDER.

MattCowgill commented 5 years ago

OK, thanks for clarifying, sorry for the silly question.

noamross commented 5 years ago

Not silly at all! It's helpful to see what snafus people run into and what in the package can be confusing.