Search code examples
visual-studio-codelatex

run vscode extension latex-workshop with --halt-on-error instead of --interaction=nonstopmode


I'm using vscode with the latex-workshop extension, and the compilation sometimes hangs when compiling tikz graphics.

The FAQ recommends in this case:

When builds result in an infinite loop with TikZ or other advanced packages, please replace -interaction=nonstopmode with -halt-on-error in your recipe.

But how do I do this? The recipes are not in settings.json but in ~/.vscode/extensions/james-yu.latex-workshop-8.23.0/package.json, and I don't think I'm supposed to edit that directly?

What should I put in settings.json to change say the latexmk tool (which is called by the latexmk recipe if I understand correctly, see here) to --halt-on-error?


Solution

  • The option can be modified from the setting in the settings.json:

    latex-workshop.latex.magic.args
    

    Or from the VSCode settings as can be seen in the picture below enter image description here