I'm using LaTeX and JabRef on Windows. I set up my bibliography database and cited references in my LaTeX document. However, I do not know how to use the command line on Windows to do the 'latex bibtex latex latex' compile. So my question is: How can I do the 'latex bibtex latex latex' compiling using Windows without the command line?

  • 1
    Which editor do you use for writing your LaTeX document? Most LaTeX editors, such as TeXworks (included in MikTeX and TeX Live) have features for running both pdflatex and bibtex. Jun 25, 2013 at 22:08
  • I'm using the TeXworks editor. How can I do the compiling with this?
    – Maria
    Jun 25, 2013 at 22:11
  • 1
    this question was made for arara :) have a look at Tools for automating document compilation. Welcome!
    – cmhughes
    Jun 25, 2013 at 22:12
  • As an aside, the command line is very simple for things such as this. All you really need is cd (change directory) and pdflatex itself. See this short introduction for more detailed info and screenshots. The command to compile a LaTeX document is pdflatex mydocument.tex. That said, this can become a pretty mundane process, so there are a ton of tools available for the task. Your editor will likely help you here. Jun 25, 2013 at 22:23
  • With the drop-down menu next to the compile button you can choose which tool to use, BibTeX is on the list. If you're using MikTeX, you'll also find an entry called pdfLaTeX+MakeIndex+Bibtex, if you use this, then all the necessary compilations will be done automatically, without you having to switch tool and click again. Jun 25, 2013 at 22:32

1 Answer 1


Try adding this line in the preamble of your document:

\immediate\write18{bibtex \jobname}

It runs bibtex every time you typeset your document.

It has the advantage that it doesn't need separate run of bibtex, but with the disadvantage that it runs bibtex even when it is not required: not every time it is necessary to run bibtex, but only when a new citation or change in citation order happens.

Beware that shell-escape needs to be enabled for this code to perform. shell-escape is enabled via

pdflatex -shell-escape filename.tex
  • 2
    This doesn't really flow well with an anti-command-line workflow... Jun 26, 2013 at 0:51

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