【LaTeX 问题解决方案】I couldn‘t open file name `.aux‘

最近用 vscode 的 latex 插件编译论文的时候发现,编译 bibtex 时总会报错:I couldn’t open file name “.aux”。但是在编译 xelatex 时发现已经产生了一个 aux 文件,那么为什么 latex 插件无法找到 aux 文件呢?

经过一番摸索,我发现问题出现在设置文件中。

"latex-workshop.latex.clean.fileTypes": [        // "*.aux",        "*.bbl",        "*.blg",        "*.idx",        "*.ind",        "*.lof",        "*.lot",        "*.out",        "*.toc",        "*.acn",        "*.acr",        "*.alg",        "*.glg",        "*.glo",        "*.gls",        "*.ist",        "*.fls",        "*.log",        "*.fdb_latexmk"    ], 

可以发现,设置中默认会清除掉 aux 文件。这导致每次调用完 xelatex 时产生的 aux 文件在调用 bibtex 时就会被删掉。

因此,解决方案就是将 .aux 这里注释掉,这样就不会自动清除 aux 文件,能够让 bibtex 正确编译参考文献。

评论
暂无评论

登录后可发表评论

点击登录