I have just installed texmaker on my linux mint OS. Everything seems to work fine, except for the references. I put a document "references.bib" in the same folder as my "main.tex"; however, texmaker doesn't seem to execute bibtex properly. I receive an "undefined reference" error and a question mark shows up in the pdf.

If I navigate to the folder in my terminal and then call:

bibtex main
latex main
latex main

I receive errors after the first latex main but no errors after the second call, and if I then compile again in texmaker it does the referencing correct. However, I have to do this every time I put in a new reference, which is quite annoying. Any suggestions?

  • 1
    Hi and welcome, you have to call LaTeX first, then BibTeX, then LaTeX again (maybe more than once).
    – Johannes_B
    May 6, 2015 at 9:47
  • Hi Johannes, thank you for your answer! It works if I call bibtex/latex from the terminal, but I would like to do everything from within texmaker. How can I configure texmaker such that I don't need to switch to the terminal all the time?
    – Scipio
    May 6, 2015 at 10:14
  • Usually, eerything will work fine. If you call BibTeX from within TeXmaker, do you get any mesages?
    – Johannes_B
    May 6, 2015 at 10:16
  • If, in texmaker, I first call latex, then bibtex, then latex twice and then do "quick build" it works. But if I call "quick build" directly it doesn't
    – Scipio
    May 6, 2015 at 10:24
  • I am not sure what quick build does, but the first LaTeX run is essential, even in the terminal. That first run writes down which entries are cited and BibTeX later reads that information. The next LaTeX run will read what BibTeX wrote down.
    – Johannes_B
    May 6, 2015 at 10:29

2 Answers 2


As Johannes_B pointed out, when using BibTeX it is essential to maintain a specific order in commands.

The "Quick Build" command in Texmaker is a shortcut to execute a series of commands at once. What specific serie is executed can be configured via Options -> Configure Texmaker -> Quick Build. The default is set to "PdfLaTex + View PDF". Changing this to "PdfLaTex + Bib(la)tex + PdfLaTex (x2) + View PDF" solves the problem and allows one to compile and view the project in one command.

[edit] Additional remark by Johannes_B: speed may suffer when changing these defaults, the user may want to keep that in mind.


the problem is that first you have to latex or pdflatex scroll through the entire document, once or twice, so you can pick up all the bibliographic references that you used, so you tendiras console or part of compilation of Texmaker first call latex, then to bibtex, and finally to latex to generate the reference.

You must log in to answer this question.

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