[texhax] Alignment in a \newwrite file?
geolsoft at mail.ru
geolsoft at mail.ru
Sat Aug 21 10:42:50 CEST 2004
On Fri, Aug 20, 2004 at 10:49:13PM +0200, Rodolfo Medina wrote:
> Now, I would like all the stuff that gets into bluefile.tex to be aligned
> according, e.g., to the template
>
> \halign{#&#\cr}
>
> , i.e. all the bluefile.tex to be structured according to that alignment
> template.
> Is it possible to achieve this, and how?
If I got you right, the following does the job:
%%%%%%%%%%%%%%%%%%%%begin of myfile.tex%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newwrite\blue
\immediate\openout\blue=bluefile
\outer\def\putstuffoverthere#1#2{\immediate\write\blue{#1,& #2!\cr}}
\putstuffoverthere{Hallo}{folks}
\putstuffoverthere{Goodbye}{folks}
\immediate\closeout\blue
{\catcode`@=11 \halign{#&#\cr\input bluefile }}
\bye
%%%%%%%%%%%%%%%%%%%end of myfile.tex%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If you don't need the \catcode`@=11, the example above can
work without it.
Best regards,
Oleg Katsitadze
More information about the texhax
mailing list