RMarkdown / pandoc fails to knit Pdf with latex color commands

删除回忆录丶 提交于 2019-12-04 20:40:44

Addition of “header-includes: \usepackage{color}” to the YAML header, as seen below, addresses the issue. However, it is unclear why insertion of an “echo = TRUE” R-code chunk also resolves the issue.

---
title: "test"
output: pdf_document
header-includes: \usepackage{color}
---

Interestingly, with a previous version of the R-Studio suite, as see below, inclusion of “header-includes: \usepackage{color}” in the YAML header, did not appear necessary prior to use of commands such as "\textcolor{blue}{Character String}" in the .rmd file.

  • Mac OS: 10.10.5
  • R Version: 3.2.2
  • MacTex: 2014 / TexLive: 6.2.0
  • Rmarkdown: 1.0
  • Knitr: 1.13
  • Pandoc: 1.13.1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!