News for hackers. Stuff that matters.
Re:What is LaTeX and Why You Should Care by petrilli on Tuesday August 03, 2010 @12:04PM (#1571630)
You probably know, but the reason there are multiple passes is because once a page is typeset, you can't go back and "fix" it. TeX is very page-centric. So references, for example, aren't "knowable" until you've typeset all the pages. Then the next pass goes through and updates the forward references.

It could be done another way, but in the era that TeX was developed, it would have required more memory than was realistically available most of the time. I find that once I've run it twice, I can get away with single runs usually after that until I'm ready for the "definitive" version. Until then, I'm less concerned with whether the cross-reference is right, than whether there is a cross-reference in that location at all.

Re:What is LaTeX and Why You Should Care by shasta on Tuesday August 03, 2010 @02:09PM (#1572076)
You know, gcc uses multiple passes, too, internally. If gcc were to use latex's model, you'd have to run it multiple times to get a working executable. Mind you, it would produce an executable every time, but those first ones would just crash. Latex can produce some nice looking documents, but as a technology, it's shoe strings and bubble gum.
Re:What is LaTeX and Why You Should Care by mturmon on Tuesday August 03, 2010 @06:39PM (#1573014)
The only problem is that the cross-references may be out of sync. This is usually not a serious barrier to readability.

Another gcc analogy is a dependence on a third-party library whose API keeps changing. Then you'd have to run gcc once to regenerate the library, and once on the client using the library.

Peeling that back a level, the analogy is between files like libfoo.a and foo_defs.h (for gcc) and files like section1.aux and document.bbl (for latex).

Re:What is LaTeX and Why You Should Care by aeroevan on Tuesday August 03, 2010 @09:37PM (#1573400)
LaTeX will warn you when the references are out of sync, and there is no reason why it can't make a second (or third) pass internally without having to call (pdf)latex manually again and throwing .aux .log .other_random_stuff files everywhere.
Re:What is LaTeX and Why You Should Care by parfe on Wednesday August 04, 2010 @09:26AM (#1574420)
So whip up a shell script and call it "better_latex" mark it +x and call the real exe multiple times. Now it's an improved version that does it internally, just like gcc
Re:What is LaTeX and Why You Should Care by neilc on Wednesday August 04, 2010 @01:18AM (#1573718)
I just use LaTeX-Mk or a similar package, which takes care of multiple runs of LaTeX fairly well.

http://latex-mk.sourceforge.net/