Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

参考文献报错的解决方法 (vscode+texlive) #2

Closed
lorraine-sun opened this issue Sep 7, 2024 · 3 comments
Closed

参考文献报错的解决方法 (vscode+texlive) #2

lorraine-sun opened this issue Sep 7, 2024 · 3 comments

Comments

@lorraine-sun
Copy link

在vscode+texlive环境下运行可能会遇到\bibliography报错can be used only in preamble
是因为需要把编译链中的bibtex换成biber
在setting.json设置中,"latex-workshop.latex.tools"里增加

{
    "name": "biber",
    "command": "biber",
    "args": [
      "%DOCFILE%"
]
}

在"latex-workshop.latex.recipes"里增加

{
    "name": "xelatex -> biber -> xelatex*2",
    "tools": [
      "xelatex",
      "biber",
      "xelatex",
      "xelatex"
 ]
 }

然后编译的时候点击这个新设置的编译链,就可以成功运行了
个人尝试,仅供参考~

@pasteller
Copy link
Owner

谢谢,已经在README中补充~

@ahsnuet
Copy link

ahsnuet commented Nov 25, 2024

For TeXstudio follow the following procedure

Options > Configure TeXstudio > Build > Default Compiler > Click Configure icon and make the following changes:
image

@Jinzhan-20
Copy link

还出现了一个bug,biber和biblatex版本不兼容,刚开始我的biber是2.20,biblatex版本比较低,直接编译链运行会直接终止且不会报错误位置,使用biber main命令运行的时候才告诉我两个版本不兼容,使用tlmgr update --all更新所有宏包,之后重启vscode解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants