What's the safe way to make \def's local to a component? I could wrap each component in a \begingroup..\endgroup but that might do bad things to the output routine. -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
Sanjoy Mahajan wrote:
What's the safe way to make \def's local to a component? I could wrap each component in a \begingroup..\endgroup but that might do bad things to the output routine.
\pushmacro\whateveryouwant ungrouped stuff \popmacro\whateveryouwant ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
\pushmacro\whateveryouwant ungrouped stuff \popmacro\whateveryouwant
Thanks, that works. A small example, in case others find it useful: \starttext \def\y{outside\par} \y \pushmacro\y \def\y{inside\par} \y \popmacro\y \y \stoptext which produces outside inside outside -Sanjoy `Never underestimate the evil of which men of power are capable.' --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
participants (2)
-
Hans Hagen
-
Sanjoy Mahajan