lervag / vimtex

VimTeX: A modern Vim and neovim filetype plugin for LaTeX files.
MIT License
5.29k stars 386 forks source link

How do I get rid of a "latexmk is not executable" error? #2965

Closed tomchor closed 4 weeks ago

tomchor commented 4 weeks ago

Description

I just installed vimtex and I'm loving it. However whenever I open a latex file I get the following error:

VimTeX: latexmk is not executable
Error detected while processing BufRead Autocommands for "*.tex"..function dist#ft#FTtex[49]..FileType Autocommands for "*"..function <SNR>12_LoadFTPlugin[18]..script /usr/share/vim/vimfiles
/ftplugin/tex_latexSuite.vim[12]../usr/share/vim/vimfiles/ftplugin/latex-suite/main.vim[969]../usr/share/vim/vimfiles/ftplugin/latex-suite/texviewer.vim:
line  895:
/usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py:34: SyntaxWarning: invalid escape sequence '\s'
  """ 

I should say, I don't use, nor do I need, latexmk. So if a simple solution is to just tell vimtex to not try to look for latexmk, I'm fine with that!

Thank you so much.

Steps to reproduce

No response

Expected behavior

No response

Actual behavior

No response

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: Manjaro Linux
  Vim version: VIM 9.1 (1-445)
  Has clientserver: false

VimTeX project: headland
  base: headland.tex
  root: /home/tomas/Dropbox/headland
  tex: /home/tomas/Dropbox/headland/headland.tex
  main parser: current file verified
  document class: ametsocV6.1
  packages: booktabs hyperref ulem
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: General
  qf method: LaTeX logfile
lervag commented 4 weeks ago

I just installed vimtex and I'm loving it.

Glad to hear it!

However whenever I open a latex file I get the following error:

VimTeX: latexmk is not executable

I should say, I don't use, nor do I need, latexmk. So if a simple solution is to just tell vimtex to not try to look for latexmk, I'm fine with that!

I think you should use latexmk. It really is very good. And it should be easy to install on all Linux distributions.

If you insist, then you can disable it with the g:vimtex_compiler_enabled option.

Now:

Error detected while processing BufRead Autocommands for ".tex"..function dist#ft#FTtex[49]..FileType Autocommands for ""..function 12_LoadFTPlugin[18]..script /usr/share/vim/vimfiles /ftplugin/tex_latexSuite.vim[12]../usr/share/vim/vimfiles/ftplugin/latex-suite/main.vim[969]../usr/share/vim/vimfiles/ftplugin/latex-suite/texviewer.vim: line 895: /usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py:34: SyntaxWarning: invalid escape sequence '\s' """

This error indicates that you are also loading vim-latex, aka LaTeXSuite. That is strongly discouraged, since it will conflict with VimTeX. Further, it seems you installed that plugin at the system level, which I also strongly recommend against. You shouldn't install any vim plugin at system level. So, please consider to remove latex-suite.

tomchor commented 4 weeks ago

I just installed vimtex and I'm loving it.

Glad to hear it!

However whenever I open a latex file I get the following error:

VimTeX: latexmk is not executable

I should say, I don't use, nor do I need, latexmk. So if a simple solution is to just tell vimtex to not try to look for latexmk, I'm fine with that!

I think you should use latexmk. It really is very good. And it should be easy to install on all Linux distributions.

If you insist, then you can disable it with the g:vimtex_compiler_enabled option.

Thank you! This indeed worked.

For the record, I read up on latexmk but it doesn't seem like something I need. Most of the times I'm okay just running running pdflatex on my documents even though I know the references, toc, etc., won't be updated to save time for example. (My documents often get pretty heavy and can sometimes take a few seconds to fully compile everything...)

idk, I may be misunderstanding the advantages of latexmk as well.

Now:

Error detected while processing BufRead Autocommands for ".tex"..function dist#ft#FTtex[49]..FileType Autocommands for ""..function 12_LoadFTPlugin[18]..script /usr/share/vim/vimfiles /ftplugin/tex_latexSuite.vim[12]../usr/share/vim/vimfiles/ftplugin/latex-suite/main.vim[969]../usr/share/vim/vimfiles/ftplugin/latex-suite/texviewer.vim: line 895: /usr/share/vim/vimfiles/ftplugin/latex-suite/bibtools.py:34: SyntaxWarning: invalid escape sequence '\s' """

This error indicates that you are also loading vim-latex, aka LaTeXSuite. That is strongly discouraged, since it will conflict with VimTeX. Further, it seems you installed that plugin at the system level, which I also strongly recommend against. You shouldn't install any vim plugin at system level. So, please consider to remove latex-suite.

That is weird because this is a brand new computer and I didn't install vim-latex. It doesn't appear anywhere on my vundle list either. Could this be caused by something else?

tomchor commented 4 weeks ago

Okay, you were (unsurprisingly) right! One of my old start-up scripts had vim-latexsuite there and I didn't notice :roll_eyes:

I removed it and now I get no warnings. Thanks so much for the help!

lervag commented 4 weeks ago

My pleasure; glad to hear it works now!