20

I need a little help here. Until now, what I need is to compile a LaTeX into a PDF with BibTeX references I need to execute the next sequence:

1. pdflatex document.tex
2. bibtex document.tex
3. pdflatex document.tex
4. pdflatex document.tex

And for glossaries I need to:

5. pdflatex document.tex
6. makeglossaries document
7. pdflatex document
8. pdflatex document

And even in some places I've read that step 5 and 6 need to be repeated in some circumstances, but I didn't understand them well.

So my question is what is the sequence of step to create the PDF with BibTeX and with a glossary? I need to automate this so, in what specific circumstances do I need to re-execute any of the steps?

2
  • 1
    I think this question has already been answered on this site. For example, tex.stackexchange.com/questions/64/…
    – TH.
    Dec 10, 2010 at 1:16
  • that question don't consider glossaries, i want to know the best sequence of step including the Glossary generation
    – mjsr
    Dec 10, 2010 at 1:21

1 Answer 1

17

It's not really as complicated as you think. Just do:

 1. pdflatex document
 2. bibtex document
 3. makeglossaries document
 4. pdflatex document
 5. pdflatex document

It doesn't matter if you do step 3 before step 2 either.

Next you might want to take a look at the link TH posted if you're looking for a tool to automate the workflow.

5
  • 2
    with this command sequence i ended up with wrong page references...
    – jrast
    Jan 3, 2014 at 8:40
  • 1
    @jrast run pdflatex again to get the page references updated.
    – imnothere
    Jan 4, 2014 at 10:15
  • 2
    Actually I had to run this sequence: pdflatex -> bibtex -> makeglossaries -> pdflatex -> bibtex -> makeglossaries -> pdflatex -> pdflatex. Maybe because my glossarie is before the sections?
    – jrast
    Jan 4, 2014 at 23:22
  • 1
    @jrast Pdflatex -> bibtex -> makeglossaries -> pdflatex -> pdflatex -> pdflatex (and at times yet another pdflatex...) would have done it just fine.
    – imnothere
    Jan 5, 2014 at 0:34
  • No, it don't matter how many times i run pdflatex at the end, the references stay the same (i gave up after 5 runs). And in my opinion they can't change because they are read out of the .gls file which is only written by makeglossaries.
    – jrast
    Jan 5, 2014 at 12:56

You must log in to answer this question.

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