在 RMarkdown 中启用 LaTeX shell 转义
Enabling LaTeX shell escape in RMarkdown
我正在处理我想使用 shell 转义选项使用 xelatex 编译的 RMarkdown 文档。 RStudio documents 描述了如何为 *.tex
文档完成此操作,但 Enable shell escape command 选项似乎不会影响 Markdown 文档的编译.
这是我的 YAML header。有没有一种方法可以通过在 YAML 中指定它来将 --enable-write18
选项传递给 LaTeX 引擎?
---
title: "My document"
author: "Me"
date: "2016-01-01"
documentclass: report
output:
pdf_document:
latex_engine: xelatex
number_sections: yes
template: ard-pandoc-template.tex
toc: yes
---
# Test
asdfjkhasdf
在另一个 RStudio page 上找到了答案。有一个选项可以从 YAML header:
向 Pandoc 传递额外的参数
output:
pdf_document:
latex_engine: xelatex
pandoc_args: "--latex-engine-opt=--enable-write18"
我正在处理我想使用 shell 转义选项使用 xelatex 编译的 RMarkdown 文档。 RStudio documents 描述了如何为 *.tex
文档完成此操作,但 Enable shell escape command 选项似乎不会影响 Markdown 文档的编译.
这是我的 YAML header。有没有一种方法可以通过在 YAML 中指定它来将 --enable-write18
选项传递给 LaTeX 引擎?
---
title: "My document"
author: "Me"
date: "2016-01-01"
documentclass: report
output:
pdf_document:
latex_engine: xelatex
number_sections: yes
template: ard-pandoc-template.tex
toc: yes
---
# Test
asdfjkhasdf
在另一个 RStudio page 上找到了答案。有一个选项可以从 YAML header:
向 Pandoc 传递额外的参数output:
pdf_document:
latex_engine: xelatex
pandoc_args: "--latex-engine-opt=--enable-write18"