单击编织按钮与启动rmarkdown::render
时,我有一种不存在的行为。
我有一个名为 test.Rmd 的参数化.Rmd:
---
title: '`r params$college` report'
params:
college: 'Art & Business'
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, message = F)
```
```{r}
library(tidyverse)
library(knitr)
library(kableExtra)
```
```{r}
mtcars %>%
kable( format = 'latex', longtable = T, booktabs = T) %>%
kable_styling(bootstrap_options = "condensed", font_size = 8) %>%
landscape(margin = c('1cm'))
```
如果单击编织按钮,文件会编织。但是,如果我使用以下方法从控制台编织:
rmarkdown::render('test.Rmd',
params = list(college = 'Art and Business'),
output_format = 'pdf_document')
我收到以下错误:
/Applications/RStudio.app/Contents/MacOS/pandoc/pandoc + RTS -K512m -RTS test.utf8.md - to latex --from markdown + autolink_bare_uris + ascii_identifiers + tex_math_single_backslash --output test.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rmarkdown/rmd/latex/default-1.17.0.2.tex - 高亮式探戈--latex-engine pdflatex - 变量图形=是 - 变量'几何:margin = 1in' !乳胶错误: 环境景观未定义。
错误:无法编译test.tex。有关详细信息,请参阅test.log。