12
votes
2answers
355 views

All about \shipout

While reading about packages that allow to hook macros to certain events, I came across this command, \shipout. Searching on the internet didn't help a lot but if I'm not so wrong it's somehow related ...
3
votes
1answer
98 views

Hook tex macro without altering tokens stream

Is is possible to hook a macro with function which writes some info to file or log without altering stream which creates dvi file. For example if i have macro definition \def\foo{\mathop{A}} and i ...
9
votes
2answers
204 views

Hooks into mathmode

Short version Is there a way to pipe every symbol in a math environment unevaluated to an external program w/o manipulating the (La)TeX file directly (except for adding header files) or patching TeX ...
15
votes
2answers
1k 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}% ...