This question is purely academic. TeXing a file containing
! Emergency stop. error. Is that the shortest code which produces a fatal error in TeX?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.Sign up to join this community
EDIT: Shorter version, as suggested by Bruno:
I can't go on meeting you like this:
And this gives
This can't happen:
A file just consisting of
^H (IIRC the only character with catcode invalid by default in LaTeX) will do it:
[1 1016] ~/temp % echo -e '\b' | latex This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) **entering extended mode ! Text line contains an invalid character. <*> ^^H ? ! Emergency stop. <*> ^^H No pages of output. Transcript written on texput.log. [1 1017] ~/temp %
Here's the log:
This is TeX, Version 3.1415926 (TeX Live 2011) (format=tex 2011.8.28) 14 OCT 2011 11:17 **short (./short.tex) ! Emergency stop. <*> short *** (job aborted, no legal \end found) No pages of output.
If running with
-interaction=batchmode is allowed then I win: just try
touch inexistent.tex tex -interaction=batchmode inexistent
and you'll get
This is TeX, Version 3.1415926 (TeX Live 2011) (format=tex 2011.8.28) 14 OCT 2011 11:25 **inexistent.tex (./inexistent.tex) ! Emergency stop. <*> inexistent.tex *** (job aborted, no legal \end found) No pages of output.
The output of the shell to check:
> ls -l inexistent.tex -rw-r--r-- 1 enricomb staff 0 Oct 14 11:25 inexistent.tex
Another short way of making TeX blow up is to have a file named
+.tex consisting of
+.tex inputs itself, and TeX sadly stops with the error
! TeX capacity exceeded, sorry [text input levels=15].
Yet another way to crash the engine:
\closeout18\bye causes a segmentation fault in pdfTeX and in XeTeX when trying to ship out the page. The last line shown on the terminal is
[1zsh: segmentation fault (core dumped) pdftex '\closeout18\bye'