## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Proportional Font Show Text Part by Default Show All Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Side remarks about TeX input sequence Michael John Downes <[log in to unmask]> Tue, 13 Feb 2001 11:47:16 -0500 text/plain (28 lines) Hans Aberg <[log in to unmask]> writes: > I am not a TeX guru, but I get the impression that the TeX looks like this: > > The string of TeX tokens buffer is normally empty, but sometimes a macro > may insert a string of tokens (perhaps a macro expansion can be viewed as > though the body is first inserted in this buffer, before being evaluated). Yes, that is quite true, but Knuth calls that buffer an input stream, and there may be multiple nested input streams open at any given moment. This is what one sees in the multiple levels of error context (visible when errorcontextlines > 1). > The tokens at need. TeX reads into the buffer one line at a time. In particular, the character at the end of the line will be whatever was the value of \endlinechar at the point when the read was triggered. But the catcode of the endlinechar can be changed at any point until TeX takes it from the line buffer and turns it into a token. > TeX does not back-track. \futurelet, \uppercase, \lowercase, \expandafter and perhaps one or two others do backtracking in the token stream, but yes there is no backtracking in the line buffer.