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

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Monospaced Font

Subject:

Side remarks about TeX input sequence

From:

Date:

Tue, 13 Feb 2001 11:47:16 -0500

Content-Type:

text/plain

Parts/Attachments:

 text/plain (27 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.