# [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{ \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?