Currently I’m trying to get the vimtex plugin working with neovim and my local installation of texlive. The vimtex plugin (by default) uses the following command to compile a document:
latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf file.tex
When I run this command in my terminal on a document I want to compile, everything works as expected. I get the appropriate pdf output with no errors. However, when I open neovim with vimtex and compile from within neovim, I get the errors:
main.tex|| File `darkmode.sty' not found.
main.tex|3 error| Emergency stop.
main.tex|3 error| Fatal error occurred, no output PDF file produced!
This behavior is with the texliveFull
package from nixpkgs installed. However, I get the same behavior when I try to install the problem package with:
(texlive.withPackages (ps: with ps; [
darkmode
latexmk
# other packages
]))
Is there something I might be missing about how to install packages for latex?