2

I ported my thesis project from overleaf to texmaker. I am working with basic-miktex-2.9.5105 and Texmaker 4.4.1 for Windows. After installing all the packages and it compiled correctly. However, for \ref and \cite I get:

enter image description here

In my document, the libary should be shown as following:

...
\backmatter
\bibliographystyle{siam}
\refstepcounter{chapter}
\bibliography{thesisbiblio}
\clearemptydoublepage
\end{document}

The bibtex file is on the right path and also specified under the right name.

enter image description here

However, on overleaf this worked. I tried to refresh the bibliography under Edit>Refresh Bibliography, however, this does not work.

I really appreciate your replies!

6
  • 1
    Does tex.stackexchange.com/questions/63852/… help at all?
    – Joseph Wright
    May 15, 2015 at 6:42
  • @Kate That suggests you are only running LaTeX once. Cross-references need multiple runs, which Overleaf I think does automatically. In the same way, to get references in you need to run LaTeX, BibTeX, LaTeX, LaTeX (as mentioned in the linked question), which you normally have to do by hand but which Overleaf may do behind the scenes.
    – Joseph Wright
    May 15, 2015 at 9:17
  • Press F6, F10 (maybe F11?), F6, F6, F7 and see if it works.
    – Sigur
    May 15, 2015 at 10:00
  • LaTeX can only refer to things that alreays exists. LaTeX builds the file from top to bottom so when you first created that reference it didnt existed when he first tried to link to it. Basically press on run again so he can link to it
    – BlueWizard
    May 15, 2015 at 12:46
  • 1
    @Kare With your main document in the active window of Texmaker, press F6 for pdflatex, then F11 for bibtex, then F6 two more times to resolve the references, and finally F7 to view the pdf. This is the approach I teach new LaTeX users to follow as you get to see any errors or problems at the step when they occur. If you want the one step approach then select Options-QuickBuild and check the fourth option in the list which does bibtex. Again caution, with quick build your errors logs and the errors reported by Texmaker become nearly useless because of the multiple steps. May 15, 2015 at 14:52

1 Answer 1

1

The solution is concerning the build directory option.

You didn't state if you changed the default TexMaker menu -> options -> commands -> "Use a build subdirectory" which is disabled (by default).

If you did not change that, then the above @Kate and @R. Schumacher instructions should work for you.

The instructions should NOT work for you if you changed the default to use a separate build directory (at least for Windows). So by disabling that option, the instructions should then work for you. Here is why.

The F6/pdflatex step puts the .aux file(s) in the build directory.

However, the F11/bibtex step will look in the default directory (not the build directory).

So after step F6/pdflatex, you can manually copy the .aux file(s) from the build directory to the default directory. However, here is a way to configure TexMaker to work around the issue.

If you configure the build, you can change the menu > options > configure > commands > Bib(la)tex settings

The original entry is: bibtex %

Change it to: bibtex build\%

The above worked for me on Windows 8.1.

You must log in to answer this question.

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