[texhax] Macro or environment for writing latex text to a file

Tobias Nipkow nipkow at in.tum.de
Fri Dec 21 08:15:28 CET 2007

```Hi,

I need a macro or latex environment for writing blocks of latex text to
a file. I have tried \write, but it is confined to single lines. I would
like something like
\tofile{f}{...}
which writes the latex text ... to file f. The main requirement is that
the text can span several lines.

Please be so kind to reply to nipkow at in.tum.de, I am not a regular
texhax subscriber.