我的操作系统是 manjaro,我很厌倦下载和安装 texlive(5G 甚至更大),因为我熟悉 R,所以我尝试 tinytex。
我在其他用户的博客中找到了 xelatex 的 tinytex 版本“latex-workshop.latex.tools”,但对于 bibtex,我无法找到。
"name": "tinytex_xelatex",
"command": "Rscript",
"args": [
"-e",
"tinytex::xelatex(commandArgs(trailingOnly=TRUE)[1],clean=FALSE,engine_args=\"-synctex=1\")",
"%DOC_EXT%"
]
答案1
抱歉回复迟了。LaTeX workshop 扩展中有两个重要的键:latex-workshop.latex.recipes
和latex-workshop.latex.tools
。你说添加tinytex_xelatex
对你有用,所以我假设你latex-workshop.latex.tools
看起来像这样:
"latex-workshop.latex.tools": [
{
"name": "tinytex_xelatex",
"command": "Rscript",
"args": [
"-e",
"tinytex::xelatex(commandArgs(trailingOnly=TRUE)[1],clean=FALSE,engine_args=\"-synctex=1\")",
"%DOC_EXT%"
]
},
{
"name": "bibtex",
"command": "bibtex",
"args": [
"%DOCFILE%"
],
"env": {}
},
(and the defaults)
]
接下来,食谱可以结合bibtex
和tiny_xelatex
。它应该看起来像
"latex-workshop.latex.recipes": [
{
"name": "tinytex_xelatex",
"tools": [
"tinytex_xelatex"
]
},
{
"name": "tinytex+bibtex",
"tools": [
"tinytex_xelatex",
"bibtex",
"tinytex_xelatex",
"tinytex_xelatex"
]
},
(and the defaults)
]
注意下面的第一项latex-workshop.latex.recipes
是默认编译。这回答了你的问题吗?
如果您已经尝试过,可以分享任何错误日志吗?