I have set up Latex using VScode on windows 10 with LaTeX Workshop extension, but I am running into some issues, every time I try building the project it gives me the error: Recipe terminated with error. I have followed with many posts here and to no avail unfortunately. The output log looks like this:
Sorry, but latexmk did not succeed for the following reason:
MiKTeX could not find the script engine 'perl' which is required to execute 'latexmk'.
Remedy:
Make sure 'perl' is installed on your system.
The log file hopefully contains the information to get MiKTeX going again:
C:\Users\Local\MiKTeX\miktex\log\latexmk.log
For more information, visit: https://miktex.org/kb/fix-script-engine-not-found
latexmk: major issue: So far, you have not checked for MiKTeX updates.
I installed Perl and setup the path and added the suggested log file to my JSON file and still I get the same error. My .json file looks like:
{
"window.zoomLevel": 0,
"workbench.colorTheme": "Abyss",
"terminal.integrated.shell.windows": "C:/windows/System32/cmd.exe",
"workbench.settings.editor": "json",
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.search.rootFiles.include" : ["C:/Users/vscode-lecture-files/**/*.tex"],
"latex-workshop.latex.autoBuild.run":"onFileChange",
"latex-workshop.latex.recipes": [
{
"name": "latexmk",
"tools": [
"latexmk"
],
"includePath":[
"C:/Users/Local/Programs/MiKTeX/miktex/bin/x64/latexmk.exe",
"C:/Dwimperl",
"C:/Users/Local/MiKTeX/miktex/log/latexmk.log",
"C:/Dwimperl/perl/bin/perl.exe"
]
},
{
"name": "pdflatex*2",
"tools": [
"pdflatex",
"pdflatex"
],
"env": {}
}
],
"latex-workshop.latex.verbatimEnvs":[
"verbatim",
"lstlisting",
"minted"
],
"security.workspace.trust.untrustedFiles": "open"
}
Can someone help me understand what's going on. Thanks
settings.json
include file name paths, but those should by dir name paths, right? Anyway, according to the documentation you should not need those settings, you only have to set thePATH
environment variable correctly before you start VS Code, but even that should not be needed on Windows since the LaTeX installer will set the paths correctly for you