相关疑难解决方法(0)

从R Markdown到LaTeX的错误转换

为什么以下R Markdown最小(非)工作示例无法编译为PDF?

---
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \lhead{}
- \chead{}
- \rhead{The performance of new graduates}
- \lfoot{From: K. Grant}
- \cfoot{To: Dean A. Smith}
output:
  pdf_document:
    keep_tex: yes
    latex_engine: xelatex
---

# Test
Run Code Online (Sandbox Code Playgroud)

特别是,有问题的转换发生在-\lfoot{From: K. Grant}-\cfoot{To: Dean A. Smith},如输出.tex文件所示:

---
header-includes:
- \usepackage{fancyhdr}
- \pagestyle{fancy}
- \lhead{}
- \chead{}
- \rhead{The performance of new graduates}
- \lfoot{From: K. Grant}
- \cfoot{To: Dean A. Smith}
output:
  pdf_document:
    keep_tex: yes
    latex_engine: xelatex
--- …
Run Code Online (Sandbox Code Playgroud)

latex pandoc knitr r-markdown

4
推荐指数
1
解决办法
2061
查看次数

标签 统计

knitr ×1

latex ×1

pandoc ×1

r-markdown ×1