1

When I add references to my file it outputs a question mark and the error message "citation 'label' in page '1' undefined." However, autocomplete does notice the reference which implies to me the path to the reference and the reference itself are correct. Am I missing something obvious? I added a minimal working example of my latex code below, which I edited in VSCode. Any suggesting are appreciated, thank you.

\documentclass{article}

\usepackage[nottoc]{tocbibind}

\begin{document} Whenever i cite a citation \cite{KOEL1} it shows up in autocomplete. However, the cite command is still outputting errors and question marks.

the error is :

LaTeX Warning: Citation `KJRATPROB' on page 1 undefined on input line 52.

\bibliographystyle{plain} \bibliography{reference}

\end{document}

enter image description here

Edit solution: This was a bibtex problem which was solved by running biber "document name" in the terminal. It also helped to change my imports to: \usepackage[backend=biber]{biblatex} \addbibresource{reference.bib}

  • 2
    Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. – José Carlos Santos Feb 16 '23 at 15:32
  • Sorry as José says, no code no help. See it from our side, we have no idea what you are doing so how can we help. You mention autocomplete, but never even mention which editor you are using. – daleif Feb 16 '23 at 15:41
  • 1
    This sounds like expected behaviour if bibtex hasn't been run, information about the citation isn't available to *latex compilations as *latex extracts references from an intermediate .bbl file generated by bibtex (https://tex.stackexchange.com/q/63852). It does seems to have come up before with VS Code https://tex.stackexchange.com/q/553023, https://tex.stackexchange.com/q/666883. – Dai Bowen Feb 16 '23 at 15:47
  • ok, with the edit it sounds very much like bibtex is not being run if the output pdf file contains [?] instead of the citations. – Dai Bowen Feb 16 '23 at 15:49
  • Thanks I needed to run biber documentname in the terminal. I also changed my packes to: \usepackage[ backend=biber, sorting=ynt ]{biblatex} \addbibresource{reference.bib} – dorus Boogaard Feb 16 '23 at 16:07
  • @dorusBoogaard switching to use biber/biblatex isn't necessary over bibtex/\bibliographystyle/\bibliography, but it'll certainly do the job. – Dai Bowen Feb 16 '23 at 16:15

0 Answers0