I've been working on this Latex file for quite a while now. I'm using texstudio on mac, exporting a bib file from Zotero and inserting it into my Latex document using the normal \bibliography{list}

Throughout writing this document, I constantly build and view the document. That way I know the document runs without errors. I don't know how or why but when I ran the texstudio, like I always do, this time I got errors.

  • line 176: File ended while scanning use of \harvardurl. \bibliography{list}
  • line 178: \begin{thebibliography} on input line 1 ended by \end{document}. \end{document}

And then many "undefined citations" warnings, which results in ? instead of the usual reference citation (author,year). Not all references are like that, maybe about half and they're randomly distributed across the document.

I have tried running the document without the text that I have most recently added. Also tried to re-add the bib file.

I have tried googling for this error, but none seem to be useful, as the error occurred after I had added a bit of normal text, no Latex code.

Any help with regards to what the errors mean or how to source the errors myself are highly appreciated!

I've tried to add my bib file here, but am not allowed.

  • 1
    Wlcome to Tex. Could you add a MWEB? It would help to find the problem.
    – Bobyandbob
    Commented Apr 13, 2018 at 16:36
  • 2
    Try to delete the temporary files and recompile from scratch. If that fails check the URLs in your .bib file, does one of them contain a %? Can you show us an MWE that reproduces the problem, please?
    – moewe
    Commented Apr 13, 2018 at 16:37
  • Please tell us which bibliography style you employ.
    – Mico
    Commented Apr 13, 2018 at 16:39
  • Did you check your URLs for %?
    – moewe
    Commented Apr 13, 2018 at 18:16
  • 2
    Related tex.stackexchange.com/q/426975/35864
    – moewe
    Commented Apr 17, 2018 at 11:49

1 Answer 1


To close off this thread. As @moewe mentioned, the .bib file had several % in it, which caused the Latex to skip over several other references.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .