When I compile my ConTeXt document with context file.tex, it seems that the compiler compiles the code several times. I have never noticed any messages, common in pdflatex, asking me to compile the code again. Is there ever a need for me to run this command several more times to ensure that everything in the document has settled?
|
|
|||
|
ConText MkIV uses mtxrun to manage the "run" -- i.e. how many times call luatex with the appropriate switches to complete the job. However, it's smart enough to understand how many runs are needed to actually finish the task. The first time you "compile" (ok, luatex is an interpreter and not a compiler, but let's use this word because is not so wrong, afterall we can say that every *tex is a "document compiler") this example \starttext Hello \stoptext there are 3 runs, but the second time you compile this one \starttext Hello world \stoptext there is 1 run (only if you don't erase temporary files) and this
\starttext
\dorecurse{10}{\input knuth\page}
\stoptext
needs 2 runs, always if you don't erase temp files. On the other side, a bit of experience is needed to recognize that
\starttext
\startTEXpage
\framed{\externalfigure[cow]\externalfigure[mill]}
\stopTEXpage
\stoptext
uses 3 runs the very first time, but here you can safely use
\starttext
\dorecurse{100}{%
\startTEXpage
\framed{\externalfigure[cow\recurselvel]\externalfigure[mill\recurselevel]}
\stopTEXpage
}
\stoptext
As a thumb rule As a final note, you can always find an "evil" document that modify itself at every run. To avoid endless loop, there is a "hardwire" limit (ok, you can always edit the mtxrun file to change it, of course) which is 8; if your document really need 9 passes or more, then at the end of the last run you see something like "another run is needed" --- for me, it means that I've a bad designed document. |
|||
|
|
|
No, it doesn't. |
|||||||||||||
|

contextis a Lua script that takes care of all runs necessary to have a document in final form (similar in concept tolatexmk. You can trycontext --oncefor avoiding multiple runs of the engine during document preparation. – egreg Feb 26 '12 at 14:05