1

I have a LaTex project that requires to be compiled with XeLaTex. This project compiles successfully on Overleaf, with some warnings.

I have installed MikTex in my Ubuntu and the following commands work perfectly for me on terminal and generate a PDF with no problems.

cd path/to/my/project
xelatex -interaction=nonstopmode main
biber main
xelatex -interaction=nonstopmode main

However, while doing the same thing on VS Code, my cross references are not compiled. Here is my settings.json:

{
    "latex-workshop.latex.tools": [
        {
            "name": "xelatex",
            "command": "/usr/bin/xelatex",
            "args": [
                "-interaction=nonstopmode",
                "%DOCFILE%"
            ]
        },
        {
            "name": "biber",
            "command": "/usr/bin/biber",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
            "name": "xelatex -> biber -> xelatex",
            "tools": [
                "xelatex",
                "biber",
                "xelatex"
            ]
        }
    ],
    "latex-workshop.latex.build.recipe.default": "xelatex -> biber -> xelatex",
    "latex-workshop.latex.env": {
        "PATH": "/usr/bin:$PATH"
    }
}

The VS Code terminal gives the following warnings:

LaTeX Warning: There were undefined references.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.


Package rerunfilecheck Warning: File `main.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.


Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                main
(biblatex)                and rerun LaTeX afterwards.

 )
(see the transcript file for additional information)
Output written on main.pdf (27 pages).
Transcript written on main.log.

The main.pdf prints ?? instead of cross reference labels when compiled in VS Code. The same source generates perfect PDF on Overleaf and through terminal commands. Is something wrong with my settings.json?

2
  • 1
    I wouldn't use miktex on ubuntu. Most linux users will use texlive and this will thus be much better tested and is usually much quicker to pick up package updates. Commented Sep 3 at 7:46
  • Can you convince vscode to compile your document using latexmk -pdfxe main? This should automatically do all the necessary steps (that's what overleaf uses behind the scenes) Commented Sep 3 at 7:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.