Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Although I never make any misteyk, occasionally I compile a TeX file in non-stop mode (that's how I roll) so wonderful that it just starts stuttering and spits out this

enter image description here

and provides some moral support as if it's going to make any difference to compile again.

  1. Is this an internal counter i.e. hardcoded executable level count?
  2. Is this a TeX or PDFTeX counter i.e. at which level is this counted?
  3. Can we access it and more importantly can we lower this threshold with a switch?

Teaser:

  • Can we access or reset during a compilation? I know how stupid it would be to modify this during a compilation but... yeah.
share|improve this question
18  
“Although I never make any misteyk” is a great statement! –  Speravir Jan 26 '13 at 2:46
    
No mistakes but errors (at least according to the output:-) –  Guido Jan 26 '13 at 3:47
2  
"... any misteyk", That is good england... –  Nicholas Hamilton Jan 26 '13 at 4:47
4  
MWE please. ;) –  doncherry Jan 26 '13 at 6:38
1  
Please read the logfile. There's more information there. :-) –  Martin Schröder Jan 26 '13 at 13:08
add comment

2 Answers

up vote 29 down vote accepted

The 100 value is hard coded in TeX. When it finds 100 errors when processing the same paragraph, TeX assumes to be in an infinite loop.

Here, some misplaced token (an end of tabular line) causes the insertion of a closing brace (I guess), which however is again wrong, so a \cr is inserted back, causing an infinite loop. So TeX has this protection against it spinning its wheels without ever doing any progress.

You can't change this value, unless you modify the source of TeX and recompile the program.

The hard coded value is in module 82 of tex.web.

share|improve this answer
    
wouldn't \maxdeadcycles set it? –  Yiannis Lazarides Jan 26 '13 at 12:49
5  
@YiannisLazarides no that's also 100 by default in latex but counts how many times the output routine has been called without making a page, not errors –  David Carlisle Jan 26 '13 at 13:10
    
@DavidCarlisle Thanks. –  Yiannis Lazarides Jan 26 '13 at 13:16
add comment

I would just add my two cents of experience. In (*)TeX, there are two types of errorneous code:

  1. Typos that lead to one small piece of code being wrong, with no affect to the future, e.g. $\aloha$ instead of $\alpha$, or forgotten mathmode like As we can see, f(x)=\frac{e^x}{x}, forgotten \item etc. These mistakes usually "sort out" in place, or at the end of the paragraph, producing one or two error messages.

  2. Typos/errors that propagate throughout long piece of code. For example misspelled {talubar}, which throws first "Undefined environment", and then "Misplaced \cr" for every & in the table. These, in my experience, produce so many errors that it doesn't make sense to continue in compilation anyways. The only reasonable thing is to find the first of them and correct it.

share|improve this answer
    
Indeed that's usually the case. But I was more curious about stopping a compilation earlier or even seeing whether this error count is available inside a TeX counter etc. 54 errors from different sources are also too many for me. So build up to 100 is a little too high for nonstop mode imho. –  percusse Jan 26 '13 at 11:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.