LaTeX-Workshop: LaTeX toolchain terminated with error
Description
Building a .tex file does not work. latexmk and texlive is properly installed.
How to reproduce
- Open a .tex file
- Press ctrl+shift+p
- Search for Build LaTeX project and hit enter.
Expected behavior
Correct PDF is created.
Actual behavior
In the .tex file folder filename.fdb_latexmk and filename.aux are generated.
filename.fdb_latexmk contains:
# Fdb version 3
["pdflatex"] 1499886694 "/home/nfode/test/test.tex" "test.pdf" "test" 1499886694
"/home/nfode/test/test.tex" 1499886430 2444 f714e27fca8b549e8ee059a2ea1aa60f ""
"test.aux" 1499886441 8 a94a2480d3289e625eea47cd1b285758 ""
(generated)
"test.log"
"test.pdf"
filename.aux contains:
\relax
And there is the error: LaTeX toolchain terminated with error in the statusbar.
LaTeX Workshop log messages
Log messages
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (3 by maintainers)
I had to completely restart VS Code (quit all instances) before it was able to find
latexmk.[17:58:35] LaTeX fatal error: spawn latexmk ENOENT, . Does the executable exist?The extension cannot find
latexmk, which should be inPATH. Otherwise, you need to specify its location.on my case the solution was to create a ~/.bash_profile with this line
export PATH="/usr/local/texlive/2017/bin/x86_64-darwin:$PATH"and to configure my default shell to bash.that does not solve the problem on my mac, neither does a complete restart of
VSCode. It’s very strange as it has been working fine just a few hours ago…p.s. running the
latexmkbuild command manually from within the VSCode terminal works just fine…