latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.55k stars 53 forks source link

False undefined reference error with thebibliography #1171

Closed bilichboris closed 3 weeks ago

bilichboris commented 3 months ago

Texlab marks every \cite{} as an undefined reference, although they correspond to entries in "\begin{thebibliography}". For a particular example, one can run texlab on the attached latex source code. arXiv-2106.04884v2.gz

gi1242 commented 3 months ago

I have the same issue (texlab 5.17.0, on arch linux, neovim v0.10.1). Here's a minimal example to reproduce:

\documentclass{article}
See~\cite{ref1}

\begin{thebibliography}
  \bibitem{ref1} Reference 1
\end{thebibliography}
\end{document}

It complies cleanly without errors (using latexmk); however, texlab shows Undefined reference error on ref1.

Please let me know if there's anything I can do to help you reproduce this problem.

Thanks,

GI