1

The following 12-character input causes TeX to go into a loop.

\def\x{\x}\x

It won't crash, it won't produce an error message, it'll just sit there for ever, trying to compile the document (but not getting anywhere because no matter how many times it expands \x, it just gets \x back again).

Is there a shorter input that confounds TeX in a similar way?

Hammerite
  • 3,596
  • Counterpoint: The OP in the linked question is interested primarily in finding ways to make (La)TeX go into a loop that don't rely simply on macro-expansion. However, the linked question does give an example of a nine-character input that causes a loop. – Hammerite Dec 29 '13 at 15:53
  • This should go on code golf SE – Kartik Dec 29 '13 at 16:03
  • @Hammerite When you say in a similar way, do you mean by macro expansion? Please clarify, I am beginning to feel that your question is a duplicate as indicated above. Are you asking something shorter than \def~{~}~? I am withholding my vote, with an inclination for close vote. – Masroor Dec 29 '13 at 16:10
  • @MMA, I meant that the effect should be similar, not that the method of achieving it need be similar. – Hammerite Dec 29 '13 at 16:59
  • @Hammerite Then its is a duplicate, IMHO. – Masroor Dec 29 '13 at 17:02

0 Answers0