Tagged Questions
2
votes
1answer
79 views
Append the contents of an environment to a hook using \gappto
I have a global hook (=macro) that should be appended to whenever an environment is executed. (Here, defined by the \bhook-\ehook pair.) However, I was unable to derive a working solution.
...
14
votes
2answers
764 views
How to add a hook to a macro
LaTeX uses hooks extensively, one method employed is the command g@addto@macro. It is defined in source2e as:
\long\def\g@addto@macro#1#2{%
\begingroup
\toks@\expandafter{#1#2}%
...