[XeTeX] \typeout command not recognized ?

Bruno Voisin bvoisin at mac.com
Fri Feb 24 12:17:36 CET 2006

Le 24 févr. 06 à 11:20, Bruno Voisin a écrit :

> By the way, do you know where one can find the significance of  
> these stream numbers (again I don't have the TeXbook at hand right  
> now)? plain.tex seems to indicate -1 is the log file:
> 	\def\wlog{\immediate\write\m at ne} % write on log file (only)
> and latex.ltx that 15 is texsys.aux:
> 	\immediate\openout15=texsys.aux
> 	\immediate\write15{\today^^J}
> 	\immediate\closeout15 %
> and miniltx.tex that 16 is the console.

Well, of course the TeXbook has the answer. From pp. 226-228:

> There is a \write command that writes one line to a file, analogous  
> to the \read command that reads one line; you say
> 	\write<number>{<token list>}
> and the material goes out to the file that corresponds to the given  
> stream number. If the <number> is negative or greater than 15, or  
> if the specified stream has no file open for output, the output  
> goes to the user's log file, and to the terminal unless the number  
> is negative. Plain TeX has a \newwrite command that allocates  
> output stream numbers from 0 to 15.

Thus it seems using stream numbers 16 and above will send messages to  
the console and log file, while using stream numbers -1 and below  
will send messages to the log file only.

As a result, using \@warning should be safe enough, given that both  
LaTeX (through latex.ltx) and the plain TeX compatibility layer  
miniltx.tex define it, with \@warning being in miniltx.tex:


while latex.ltx defines it essentially in terms of:

	      \set at display@protect
	      \immediate\write\@unused{^^J#2\on at line.^^J}%

LaTeX, or the art of making simple things less simple!

Bruno (feeling a wee bit cleverer than this morning -- life has these  
little epiphanies)

More information about the XeTeX mailing list