我使用 tineytex 包,当我单击 rStudio 中的 knit 按钮时,编织 pdf 没有问题。但是,当我rmarkdown::render()
使用相同的 .Rmd 文件作为输入调用时,目标文件夹中只生成了一个中间的 .tex 文件。
下面是我的代码。
rmarkdown::render(input = "C:/Users/sqhuang/Pdf.Rmd",
output_format = "pdf_document",
output_file = "test.pdf",
output_dir = ot_path)
以下是我收到的错误消息。
处理文件:Pdf.Rmd
|......... | 14%
ordinary text without R code
|................... | 29%
label: setup (with options)
List of 1
$ echo: logi FALSE
|............................ | 43%
ordinary text without R code
|..................................... | 57%
label: cars
|.............................................. | 71%
ordinary text without R code
|........................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|.................................................................| 100%
ordinary text without R code
输出文件:Pdf.knit.md
"C:/PROGRA~1/Pandoc/pandoc" +RTS -K512m -RTS Pdf.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc15f027594a1c.tex --template "C:\ PROGRA~1\R\R-36~1.1\library\RMARKD~1\rmd\latex\DEFAUL~3.TEX" --highlight-style tango --pdf-engine pdflatex --variable graphics=yes --variable " geometry:margin=1in" --variable "compact-title:yes" 这是 pdfTeX,版本 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=pdflatex) 已启用 \write18。警告:kpathsea://enterprise2/Users4$/Sqhuang_a/My Documents:无法识别的变量构造
$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents: Unrecognized variable construct
$/'。警告:kpathsea://enterprise2/Users4$/Sqhuang_a/My Documents:无法识别的变量构造$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-config/web2c/pdftex: Unrecognized variable construct
$/'。警告:kpathsea://enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-var/web2c/pdftex:无法识别的变量构造$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-home/web2c/pdftex: Unrecognized variable construct
$/'。警告:kpathsea://enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-config/web2c:无法识别的变量构造$/'. warning: kpathsea: //enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-var/web2c: Unrecognized variable construct
$/'。警告:kpathsea://enterprise2/Users4$/Sqhuang_a/My Documents/.TinyTeX/texmf-home/web2c:无法识别的变量构造“$/”。进入扩展模式错误:无法编译 \endeavor/apps_doc$/Applications/0_Support/GCS/Brett - Other Duties/BAR/Steph/AL/Jul/test_report.tex。调试技巧见 https://yihui.name/tinytex/r/#debugging。