Building a .tex file does not work. latexmk and texlive is properly installed.
Correct PDF is created.
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.
Log messages
There are no log messages.
Please provide the extension log messages. The .log file content is also appreciated.
@James-Yu there is no log file.
@nfode I mean the log messages of the extension. You can access from the output panel of vscode.
Ah sorry. Here you go!
[17:58:33] Found root file from active editor: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex
[17:58:33] Root file remains unchanged from: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex.
[17:58:35] BUILD command invoked.
[17:58:35] Found root file from active editor: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex
[17:58:35] Root file remains unchanged from: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex.
[17:58:35] Building root file: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex
[17:58:35] Build root file /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex
[17:58:35] Toolchain step 1: latexmk, -synctex=1,-interaction=nonstopmode,-file-line-error,-pdf,/home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex
[17:58:35] LaTeX fatal error: spawn latexmk ENOENT, . Does the executable exist?
[17:58:38] Root file remains unchanged from: /home/nfode/Nextcloud/uni/4.Semester/Modellierung/modellierung2017/Blatt 9/abgabe.tex.
[17:58:35] LaTeX fatal error: spawn latexmk ENOENT, . Does the executable exist?
The extension cannot find latexmk, which should be in PATH. Otherwise, you need to specify its location.
Yeah my problem is: it is in the path and also works fine from the command line. But the LaTex Preview plug in also does not work because it can not find latexmk in the path. So it seems that this is a vscode problem.
I had to completely restart VS Code (quit all instances) before it was able to find latexmk.
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.
I have the same problem.
And for now I create a "compile.bat" with
"
pdflatex dissertation.tex
bibtex dissertation
pdflatex dissertation.tex
pdflatex dissertation.tex
"
in it,
and execute it with .\compile.bat
every time.
I wish this problem would be solved someday..
when I call
latexmk --version
in the vscode terminal,
it returns
latexmk: The Perl interpreter could not be found.
But when I have installed the perl and call latexmk --version again,
the vscode terminal returns
Latexmk, John Collins, 9 December 2011. Version 4.30a
.
Then I ran
Build LaTeX project,
which also ended up with
LaTeX toolchain terminated with error.
But I can use another extension LaTeX Preview without any problem
all the time.
I think the problem is with in this extension.
Hi everyone, I'm currently using LaTex Workshop on Windows. I encountered this error as well, and since the plugin itself doesn't produce more helpful error information, it took me a while before I figured out what went wrong. In my case, the key is to check that latexmk (i.e. the default LaTex toolchain in Workshop's settings) is accessible and working from a command line window without administrator permission. On Windows, this means:
Install Strawberry Perl first. I would recommend that you install using some Homebrew-like package managers such as scoop (scoop install -g perl).
Make sure you can read from & write to the root directory to your LaTex executables without administrator permission. latexmk will throw a "Windows API error 5: Access is denied" error if it can't write to its installed directory (a simple test: just run latexmk --version in a separate, not-elevated command prompt). You can resolve this by either installing LaTex to directories other than restricted directories such as Program Files, ProgramData, etc., or allowing full control to the User group in Folder Properties > Security tab > Edit button > Users (XXX\Users).
I noticed that LaTex Workshop will correctly generate the pdf file when I chose build project, but the "View PDF file" won't open the generated PDF file (although the "View in web page" option is working). Has anyone else encountered the same issue on Windows?
Hi,I have a similar problem
The error is encountered when I open code with a code -a ./ in a folder containing my tex files and then I try to compile one of the opened tex file by Ctrl+Alt+b.
If I double click on a tex file, code will open and Ctrl+Alt+b will work fine.
So the only way for me to open my folder is first to open a single Latex file and then open a folder from this instance of code.
My path and default shell are correctly configured with texlive 2016.
Conf : Ubuntu 16.04.4 LTS, Code 1.22.1, Latex-workshop 5.1.0
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.
This perfectly solved my problem. I somehow deleted this path while doing some operation in bash_profile. Thanks a lot!
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 latexmk build command manually from within the VSCode terminal works just fine...
I have just started receiving this error after upgrading VSCode to version 1.30.
I'm running Linux Mint 17.3.
In my case, debian stretch, latexmk seems not to be installed by default when installing texlive and texlive-latex-extra package. So after installing https://packages.debian.org/stretch/latexmk it is working fine.
Most helpful comment
I had to completely restart VS Code (quit all instances) before it was able to find
latexmk.