bibtex I was expecting a `,‘ or a `}‘ 问题解决

Latex的安装

先下载安装MacTex

MacTex下载地址

再安装VSCode,安装成功后,通过VSCode下载插件

VSCode下载地址
在这里插入图片描述

settings.json文件位置

在这里插入图片描述

配置settings.json文件

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


        {
            "name": "xelatex",
            "tools": [
                "xelatex"
            ]
        },
        {
            "name": "xe->bib->xe->xe",
            "tools": [
                "xelatex",
                "bibtex",
                "xelatex",
                "xelatex"
            ]
        },
        {
            "name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
            "tools": [
                "bibtex",
                "pdflatex",
                
                "pdflatex",
                "pdflatex"
            ]
        },
        {
            "name": "Compile Rnw files",
            "tools": [
                "rnw2tex",
                "xelatex"
            ]
        },
        {
            "name": "Compile Jnw files",
            "tools": [
                "jnw2tex",
                "xelatex"
            ]
        },
        {
            "name": "tectonic",
            "tools": [
                "tectonic"
            ]
        }
    ],
    "latex-workshop.intellisense.bibtexJSON.replace": {
    
    },
    "latex-workshop.view.pdf.viewer": "browser",
    "editor.rulers": [
    
    ]
}

问题解决方案

  • 先判断bib文件内容’,’’}'是否缺失
  • 如不缺失,则说明存在编译问题,主要是编译顺序的问题
    第一步:先build Latex project,出错了我们先不管,进入第二步
    在这里插入图片描述
    第二步:选择xe->bib->xe->xe,再次build,问题解决。
    在这里插入图片描述

版权声明:本文为SilentWu原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。