Observation
When I press Ctrl+S
in a sample.tex
I get the following error: LaTeX fatal error: spawn latexmk ENOENT, . PID: undefined.
. It seems to be a path related error. I assume this occurs because the Latex Workshop
extension tries to compile something.
Debugging
I like the syntax highlighting, and I expect there may be some other functionalities in the LaTex Workshop
extension that I can appreciate in the near future. However, I don't want it to do anything other than save the file I edited when I press Ctrl+s
. I assume it does not need some advanced path to do that, as it knows where the file is located, since it was opened from some location. When I press Ctrl+F
inside the extension settings and type: compile
, I get 8 results of which I found the Latex-workshop>Latex>Recipes
and Latex-workshop>latex:Tools
to be containing the word compile
. However I did not yet find an option to disable compilation when saving.
To verify the error is caused by the LaTex Workshop
extension, I disabled it, tried saving the edited sample.tex
file using Ctrl+s
. That worked perfectly fine without raising errors.
Note, the mentioned error can be resolved with: sudo apt install latexmk
as explained in this answer. However, I would prefer VScode not to start compiling when I save a file.
Question
How can I ensure VScode saves an edited .tex
file when I press Ctrl+s
, without throwing errors, whilst using the LaTex Workshop extension
?