0

I am trying to build a LaTeX file from inside spacemacs.

I have LatexMk installed with MiKtex.

I have tried SPC m b to build a test.tex file and it does nothing.

Doing C-h C-l shows:

Running `LatexMk' on `test' with ``latexmk -pdf --synctex=1 -interaction=nonstopmode  -file-line-error  "test.tex"''
'latexmk' is not recognized as an internal or external command,
operable program or batch file.

TeX Output exited abnormally with code 1 at Tue Jul 23 00:15:25

This is strange because running the command latexmk -pdf --synctex=1 -interaction=nonstopmode -file-line-error "test.tex" at a command prompt works fine!

What am I missing?

  • it might depend on how you open emacs. If you double click on an icon, it might not have your environment variables like your path, etc. Try opening it from a shell, and if it works, that is the problem. – John Kitchin Jul 26 '19 at 21:19
  • @JohnKitchin I open from command line. Is there a way to check path from inside spacemac? – matthias Jul 30 '19 at 11:00
  • You could try echoing the path as a shell command. Or see emacswiki.org/emacs/ExecPath and ergoemacs.org/emacs/emacs_env_var_paths.html and related pages. – John Kitchin Jul 31 '19 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.