[texhax] How to accumulate TeX input for later use?

Pablo Mayckon pmsf at alu.dc.ufc.br
Thu Oct 13 20:45:58 CEST 2011


Dear TeX users,

I would like to have macros that would allow me to accumulate (La)TeX input
for later use, just like

\addtomycode{This is just bare text.}
\addtomycode{ \begin{center} This is more complex. \end{center}}
\mycode % Should produce "This is ... text. \begin{center} ... \end{center}"

What is then the best way to accomplish this? Should I "\def\mycode{}" and
then define "\addtomycode" so as to accumulate the provided arguments? (If so,
how?) Or should I save everything in a file and later read back from it?

More information about my context and needs can be found in the message titled
"How to properly accumulate TeX input for later use?" which I sent last Friday
to this list (and for which I got no answer yet).

Thanks in advance, --Pablo.



More information about the texhax mailing list