In Bookdown, `\textcolor` is not recognized when I attempt to compile an epub book using Pandoc
问题 In bookdown, it appears that \textcolor in latex is not recognized when I try to compile using bookdown::render_book('bookdown::epub_book') even though I have added \usepackage{xcolor} into the preamble.tex file. Is there a reason for this? 回答1: Let's have a look at the way the document is processed. I will leave out processing by the knitr and R Markdown packages and focus on pandoc, which is the final step when converting from Markdown to any other format. Pandoc first parses the document