I get an error message when opening vimtex-toc from the bib file with a header line specifying the master tex file %! TEX root = demo.tex. The error message is
Error detected while processing function vimtex#toc#open[5]..vimtex#index#create:
line 19:
E121: Undefined variable: b:vimtex
E15: Invalid expression: b:vimtex
line 30:
E121: Undefined variable: l:vimtex
E15: Invalid expression: l:vimtex
Minimal reproducible setup:
❯ tree mwe
mwe
├── demo.bib
└── demo.tex
0 directories, 2 files
~
❯ cat mwe/demo.bib
%! TEX root = demo.tex
@article{lin1973,
author = {Shen Lin and Brian W. Kernighan},
title = {An Effective Heuristic Algorithm for the Travelling-Salesman Problem},
journal = {Operations Research},
volume = {21},
year = {1973},
pages = {498--516},
}
~
❯ cat mwe/demo.tex
\documentclass[]{article}
\begin{document}
\cite{lin1973}
\bibliographystyle{unsrt}
\bibliography{demo.bib}
\end{document}
Opening the toc from the tex file works
Preamble
[b] demo.bib
But it does not work from the bib file anymore. I had submitted this as a feature request in issue #433.
I get an error message when opening vimtex-toc from the bib file with a header line specifying the master tex file
%! TEX root = demo.tex
. The error message isMinimal reproducible setup:
Opening the toc from the tex file works
But it does not work from the bib file anymore. I had submitted this as a feature request in issue #433.