i need a little of help here. Till now wat I now is that 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 are: 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, i need to re execute any of the step?