首先我想说我是 R 和 R markdown 的新手。我想使用 vitae 包中的简历模板,因此我安装了该包并加载了它。
接下来,我选择了其中一个(所有这些都不起作用)并单击编织按钮来渲染 PDF 文件。我正在关注 Google Analytics 课程,它说该模板的默认输出是 PDF,因此您所要做的就是单击 knit。
当我这样做时,我收到与 LaTeX 相关的错误:
processing file: Untitled.Rmd
output file: Untitled.knit.md
"D:/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS Untitled.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output Untitled.tex --lua-filter "C:\Users\ilana\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\ilana\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --template "C:\Users\ilana\AppData\Local\R\win-library\4.3\vitae\rmarkdown\templates\awesomecv\resources\awesome-cv.tex" --highlight-style tango --pdf-engine xelatex --lua-filter "C:/Users/ilana/AppData/Local/R/win-library/4.3/vitae/multiple-bibliographies.lua" --variable page_total=TRUE --variable show_footer=TRUE
! LaTeX Error: Something's wrong--perhaps a missing \item.
Error: LaTeX failed to compile Untitled.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Untitled.log for more info.
Execution halted
奇怪的是,每次我尝试渲染时,错误的输出都会不断变化。例如,这是我再次运行时的输出:
|............ | 22% [setup]
processing file: test.Rmd
"D:/RStudio/resources/app/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS test.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.tex --lua-filter "C:\Users\ilana\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\ilana\AppData\Local\R\win-library\4.3\rmarkdown\rmarkdown\lua\latex-div.lua" --embed-resources --standalone --template "C:\Users\ilana\AppData\Local\R\win-library\4.3\vitae\rmarkdown\templates\twentyseconds\resources\twentysecondstemplate.tex" --highlight-style tango --pdf-engine pdflatex --lua-filter "C:/Users/ilana/AppData/Local/R/win-library/4.3/vitae/multiple-bibliographies.lua"
output file: test.knit.md
texlive-scripts package not found (?!), skipping revision consistency check
tlmgr.pl: package repository https://mirror.ctan.org/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: textpos [5k]
running mktexlsr ...
done running mktexlsr.
tlmgr.pl: package log updated: C:/Users/ilana/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr.pl: command log updated: C:/Users/ilana/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr-commands.log
texlive-scripts package not found (?!), skipping revision consistency check
tlmgr.pl: package repository https://mirror.ctan.org/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: marvosym [131k]
running mktexlsr ...
done running mktexlsr.
running updmap-sys ...
tlmgr.pl: package log updated: C:/Users/ilana/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr.log
tlmgr.pl: command log updated: C:/Users/ilana/AppData/Roaming/TinyTeX/texmf-var/web2c/tlmgr-commands.log
tlmgr.pl: updmap-sys failed (status 1), output:
...\ilana\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:941: ...\ilana\AppData\Roaming\TinyTeX\bin\windows\runscript.tlu:864: no appropriate script or program found: updmap
tlmgr.pl: An error has occurred. See above messages. Exiting.
我确实使用以下命令安装了tinytex发行版:
tinytex::install_tinytex()
我也尝试卸载并重新安装它,但这也没有帮助。我搜索了论坛,但建议主要是关于我已经安装的tinytex,所以我不知道该怎么做。顺便说一句,当我创建新的 rmd 文件时,渲染为 PDF 格式确实适用于我,但在使用 vitae 包中的模板时则不起作用。我尝试使用另一个包,但它也不起作用,所以基本上错误发生在 rmd 模板上。
非常感谢您的帮助:)