[comp.text.tex] newlinechar in a message

adam@symcom.math.uiuc.edu (Adam H. Lewenberg) (03/10/91)

The following is a log file from an example trying to use
\newlinechar. The example is taken from "TeX for the Impatient" 
at the bottom of page 250. Why don't I get what the book says I should
get?


This is TeX, C Version 2.93 (preloaded format=plain 90.4.23)  9 MAR 1991 17:30
**&plain

*\newlinechar = `\^^J

*\message{This message appears^^Jon two lines.}
This message appears^^Jon two lines.
*\end
No pages of output.

          Thanks, Adam H. Lewenberg
-- 
University of Illinois at Champaign-Urbana, Dept. Of Mathematics
INTERNET: adam@symcom.math.uiuc.edu   or a-lewenberg@uiuc.edu

eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (03/11/91)

adam@symcom.math.uiuc.edu (Adam H. Lewenberg) writes:

>*\newlinechar = `\^^J
>*\message{This message appears^^Jon two lines.}
>This message appears^^Jon two lines.

The \newlinechar has only effect inside a \write.
You can replace \message by \immediate\write16,
and get the effect you want.

Victor.