Am 07.09.2012 um 06:38 schrieb Troy Henderson
I would like to create a macro that defines a display formula, and then redefine the same macro such that the redefinition includes the original display formula followed by another display formula. Here is my attempt.
\def\foo{\startformula a = b \stopformula} \foo \edef\foo{\foo \startformula c = d \stopformula} \foo
This fails, and I would appreciate help in getting this to work.
Your example works for me when I process it with mkiv but I would use a token list and not a macro to store the content. \starttext % macro \def\foo{\startformula a = b \stopformula} \foo \blank[2*line] \edef\foo{\foo \startformula c = d \stopformula} \foo \blank[2*line] % token list \newtoks\mytoks \appendtoks \startformula a = b \stopformula \to \mytoks \the\mytoks \blank[2*line] \appendtoks \startformula c = d \stopformula \to \mytoks \the\mytoks \stoptext Wolfgang