0

I am using MikTeX in VS Code to compile a LaTeX document. When I press 'control + s' to save and build, I get the following undefined citation warnings: Undefined Citation Warnings Example

After some research and debugging, I found that the problem is because the wrong build recipe is being used by default (when 'control + s' shortcut is used). When I use the "Recipe: pdflatex -> bibtex -> pdflatex x 2" (by clicking on the below 'play' icon next to the recipe), then the document builds without these warnings.

Correct Recipe Option

I found some suggestions online (here and here) that recommend changing the .json settings file/s, but this didn't seem to have an effect.

I want to find out how I can change the default build recipe (attached to control + s) to "Recipe: pdflatex -> bibtex -> pdflatex x 2".

EDIT: I have tried changing "ProjectSettings.json" to no avail. This is what I have:

{
  "CurrentProjectSetting": null,
  "latex-workshop.latex.tools": [
    {
        "name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
        "command": "pdflatex ➞ bibtex ➞ pdflatex × 2",
        "args": [
            "--shell-escape",
            "-synctex=1",
            "-interaction=nonstopmode",
            "-file-line-error",
            "%DOC%"
        ]
    }
],
  "latex-workshop.latex.recipes": [
    {
        "name": "pdflatex ➞ bibtex ➞ pdflatex × 2",
        "tools": [
            "pdflatex",
            "bibtex",
            "pdflatex",
            "pdflatex"
        ]
    }
],
"latex-workshop.latex.recipe.default": "pdflatex ➞ biber ➞ pdflatex × 2"
}
  • Maybe this helps: https://tex.stackexchange.com/q/553023/123129, https://tex.stackexchange.com/q/478865/123129 – dexteritas Sep 26 '22 at 12:25
  • Hi @dexteritas

    Thanks for your response. Unfortunately those were the links that I looked at (I think they are the same as the ones I linked in my original post). Anyway, I have added information to my post (see .json file above).

    – user16592739 Sep 26 '22 at 14:29
  • I believe you can move the recipe up to the first place in the list of recipes in the user-global settings file, but this will change the default recipe for everything - and that may not be appropriate if you want it changed only for this one project. – Οurous Sep 27 '22 at 04:53

0 Answers0