[texhax] Writing explicit newline to external file

Toby Cubitt tsc25 at cantab.net
Mon Jun 11 18:35:41 CEST 2007

Philip G. Ratcliffe wrote:
>> Is there some way to write an explicit newline character to 
>> an external 
>> file in (La)TeX? None of the following seem to work:
>> \write\@stream{blah blah^^Mfoo bar}
>> \write\@stream{blah blah\\foo bar}
>> {\lccode`|=13 \lowercase{\write\@stream{blah blah|foo bar}}}
> What exactly do mean by an "explicit" newline character?  Anyway, what about
> this?

I was trying to distinguish between a newline character appearing 
explicitly within a single write command, and a newline character being 
written implicitly when two lines are written with two different write 

> \write\@stream{blah blah\string\\foo bar}

Did you test this yourself? I only ask because it doesn't work for me. 
Rather, it just writes "\\".


More information about the texhax mailing list