2
votes

On Windows 10, I have MiKTex (as admin) installed and updated. Within VS Code, I have installed the LaTeX Workshop extension, but my document will not compile. I require lualatex, so I have moved that "recipe" to the "first" position in LaTeX Workshop's .json file, but compiling throws the message Recipe terminated with error. Looking at the console shows Undefined control sequence with my document's file path c:\Users\...etc... -- this is relating to the first line of the document [1,1] where I have the typical \documentclass[12pt]{article}.

It seems that the extension isn't able to locate the Path to the LaTeX executables...does this sound right? It is almost like it is looking in my files own directory for the LaTeX classes and packages, etc. In my Windows System Environment Variables, the path to C:\Program Files\MiKTeX 2.9\miktex\bin\x64\ seems to be correctly configured. Oddly, if I try to compile using pdflatex, it does not seem to encounter this specific issue (rather showing the error that I need to use lualatex, which I am trying to do).

Has anyone had this issue, or knows a way to fix it?

1

1 Answers

1
votes

1: It might be some problem related to "pdftex vs pdflatex"... Now I have the same but looking for the solution... (Win10; VSCode + Latex Workshop extension; WSL2; TexLive 2020 on Ubuntu 20.04;)

2: I've found something... in: "latex-workshop.latex.tools"

{
    "name": "pdflatex",
    "command": "pdftex", 
    "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "%DOC%"
    ],
    "env": {}
},

I changed "command": "pdftex" to "command": "pdflatex" Now it is working.