[texhax] Writing explicit newline to external file

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Fri Jun 8 14:34:36 CEST 2007


> I asked this question in another thread, but I have a feeling it got 
> buried amongst all my other comments and the replies, so I'm 
> asking it 
> again afresh.
> 
> 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}}}
> 
> I know I could do this by writing one line at a time, using multiple 
> writes, but this is unfortunately impossible for my purposes.

What exactly do mean by an "explicit" newline character?  Anyway, what about
this?

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

Cheers,  Phil



More information about the texhax mailing list