[texhax] Alignment in a \newwrite file?

Rodolfo Medina romeomedina at libero.it
Sat Aug 21 18:35:04 CEST 2004


Oleg Katsitadze wrote:

>If I got you right, the following does the job:
>etc...

Rodolfo Meidina replies:

The first solution you suggested,
the one I prefer because it only uses plain TeX commands,
seems to work fine.

But I actually need bluefile.tex to be input *before* the \putstuffoverthere
occurrencies.
I tried with:

%%%%%%%%%%%%%%%%%%%%%%%%begin of
myfile.tex%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newwrite\blue

\outer\def\putstuffoverthere#1#2{\immediate\write\blue{#1,& #2!\cr}}

{\catcode`@=11
\halign{#&#\cr \input bluefile }%
}

\immediate\openout\blue=bluefile

\putstuffoverthere{Hallo}{folks}
\putstuffoverthere{Goodbye}{folks}
\putstuffoverthere{Goodbye}{folks}

\immediate\closeout\blue

\bye
%%%%%%%%%%%%%%%%%%%%%%end of myfile.tex%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

, but it doesn't work: I get a message of `Missing \cr inserted'.
Possible to work this problem out?

Thanks indeed!
		Rodolfo





More information about the texhax mailing list