Sanitise latex captions of kable() and figures#1418
Sanitise latex captions of kable() and figures#1418ThierryO wants to merge 6 commits intoyihui:masterfrom
Conversation
|
The problem is that if I forcibly sanitize them, they may be problematic in other types of output if the source document format is R Markdown, because a character that is special to LaTeX is not necessarily special to another output format. If your source document format is R Markdown, you may consider the feature of text references in bookdown for maximum portability: https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#text-references |
|
The format of our source files is R Markdown/bookdown. We have been bitten by the examples below when rendering to pdf The format is taken into account when sanitising the Could you explain why the Travis build fails? Because |
|
Here is a minimal bookdown example that works with this PR. The Travis errors seem unrelated to me. |
|
|
Using
%and_in captions with kable() or fig.cap were problematic when rendered to pdf. These are now sanitised withescape_latex()