Latex&VScode 报错I found no bibdata command//command//citation—while reading file*.aux

Latex&VScode 报错I found no bibdata command//command//citation—while reading file*.aux

参考:Latex 编译报错 I found no \bibstyle & \bibdata & \citation command
和:(VSCode) LaTeX 所有文件报 no \citation no\bibdata bo \bibstyle 错误
问题并没有解决,但有所启发

问题描述

我使用的模板要求编译顺序: Compile with: xelatex -> biber -> xelatex -> xelatex

使用各种教程中的VScode插件配置json文件中都是 xelatex -> bibtex -> xelatex -> xelatex

实际上bibtex和biber不是一个东西,参考tex链接

导致如图问题出现
在这里插入图片描述

解决方式

在VScode的Latex的setting.json配置文件中加入biber编译的配置

 "latex-workshop.latex.tools": [
      
        {
            "name": "biber",
            "command": "biber",
            "args": [
                "%DOC%"
              
            ]
        }
    ],
 "latex-workshop.latex.recipes": [
     {
         "name": "xelatex -> biber -> xelatex*2",
         "tools": [
         "xelatex",
         "biber",
         "xelatex",
         "xelatex"
         ]

     }
 ],

重启VScode以后使用xelatex -> biber -> xelatex*2编译成功

完整配置文件

{
    "latex-workshop.latex.tools": [
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "%DOC%"
            ]
        },
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            // "command": "biber",
            "args": [
                // "%DOC%"
                "%DOCFILE%"
            ]
        },
        {
            "name": "biber",
            "command": "biber",
            // "command": "biber",
            "args": [
                "%DOC%"
              
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "xelatex",
            "tools": ["xelatex"]
        },
        {
            "name": "latexmk",
            "tools": ["latexmk"]
        },
        {
            "name": "pdflatex -> bibtex",
            "tools": ["pdflatex","bibtex"]
        },
        // {
        //     "name": "pdflatex -> bibtex -> pdflatex*2",
        //     "tools": [
        //         "pdflatex",
        //         "bibtex",
        //         "pdflatex",
        //         "pdflatex"
        //     ]
        // },
        {
            "name": "xelatex -> bibtex -> xelatex*2",
            "tools": [
            "xelatex",
            "bibtex",
            "xelatex",
            "xelatex"
            ]

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

        }
    ],
    //设置在编译完成后所需要删除的文件格式
    "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"
    ],
     //取消编译出错时的烦人气泡
    "latex-workshop.message.error.show": false,
    "latex-workshop.message.warning.show": false,

    "latex-workshop.showContextMenu": true, //添加LaTex Workshop右键菜单。
    "latex-workshop.intellisense.package.enabled": true, //根据加载的包,自动完成命令或包。  
    "latex-workshop.latex.autoBuild.run": "onSave", //保存文件时自动build(也就是说,点击保存文件或者按快捷键Ctrl+S的时候,除了会保存Tex文件,还会帮你编译LaTex为Pdf。

}

  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值