-
Notifications
You must be signed in to change notification settings - Fork 407
Startup error in multi-file document with relative paths #2246
Description
Description
I have a tex file in a subfolder that \inputs a file in another subfolder that is relative to the main document. Latexmk complies it fine, but when I open the file in vimtex I get the following error
Error detected while processing function vimtex#init[7]..<SNR>46_init_state[2]..vimtex#state#init_local[13]..vimtex#state#class#new[17]..vimtex#parser#preamble[1]..vimtex#parser#tex#parse_preamble[6]..<SNR>57_parse_preamble[16]..vimtex#parser#tex#input_parser[19]..<SNR>57_input_to_filename[26]..vimtex#kpsewhich#find[22]..vimtex#kpsewhich#run:
line 11:
E712: Argument of filter() must be a List or Dictionary
Error detected while processing function vimtex#init[7]..<SNR>46_init_state[2]..vimtex#state#init_local[13]..vimtex#state#class#new[17]..vimtex#parser#preamble[1]..vimtex#parser#tex#parse_preamble[6]..<SNR>57_parse_preamble[16]..vimtex#parser#tex#input_parser[19]..<SNR>57_input_to_filename[26]..vimtex#kpsewhich#find:
line 22:
E896: Argument of get() must be a List, Dictionary or Blob
The symptoms are similar to #2188, but seems like it's a different problem.
Steps to reproduce
I have the following file structure:
.
├── fig
│ └── some_figure.tex
├── main.tex
└── sections
└── introduction.tex
with the following contents:
main.tex
\documentclass{minimal}
\begin{document}
\input{sections/introduction}
\end{document}sections/introduction.tex
\input{fig/some_figure}fig/some_figure.tex
this is a figure(In reality this is a .pdf_tex file generated by Inkscape, but the error is the same.)
minimal.vim
set nocompatible
let &runtimepath = '~/.vim/plugged/vimtex,' . &runtimepath
let &runtimepath .= ',~/.vim/plugged/vimtex/after'
filetype plugin indent on
syntax enableThen, running vim -u minimal.vim sections/introduction.tex produces the above error.
I also tried :VimtexClearCache kpsewhich and adding let g:vimtex_cache_root = '.' to the vimrc as discussed in #2188 but it didn't help.
Expected behavior
Vimtex should load the file normally
Actual behavior
I get the error message as above, and vimtex is disabled (\ll does'nt work, no syntax highlighting between \begin{} and \end{}, etc).
Do you use a latexmkrc file?
No
VimtexInfo
This is when I open main.tex (I'm running ubuntu 20.04.3, it's not there in VimtexInfo for some reason):
System info:
OS:
Vim version: VIM 8.1 (1-2269)
Has clientserver: true
Servername: undefined (vim started without --servername)
VimTeX project: main
base: main.tex
root: /home/marci/sandbox/vimtex-debug/test
tex: /home/marci/sandbox/vimtex-debug/test/main.tex
main parser: recursive search
document class: minimal
source files:
main.tex
sections/introduction.tex
fig/some_figure.tex
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