[dev-context] [NTG-context] llap, rlap, clap equivalent for math

Taco Hoekwater taco at elvenkind.com
Thu Apr 19 12:51:38 CEST 2007

Aditya Mahajan wrote:
> Inspired by Alexander Perlis' macros in 
> http://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf
> can we have the math equivalent of llap etc. in ConTeXt.
> Ideally, \llap etc. should be modified so that they work in math mode 
> also (just like \smash and \phantom). If not, we can have the 
> following simple definitions:

Some extra \do 's fix up the textmode comands (supp-box.tex):

\def\dorlap{\begingroup\dowithnextbox{\normalhbox to \zeropoint

\def\dollap{\begingroup\dowithnextbox{\normalhbox to \zeropoint

\def\doclap{\begingroup\dowithnextbox{\normalhbox to \zeropoint

\def\dodomathclap#1#2{\doclap{$\m at th#1#2$}}

\def\dodomathllap#1#2{\dollap{$\m at th#1#2$}}

\def\dodomathrlap#1#2{\dorlap{$\m at th#1#2$}}

\unexpanded\def\rlap{\ifmmode \@EA\domathrlap \else \@EA\dorlap \fi}
\unexpanded\def\llap{\ifmmode \@EA\domathllap \else \@EA\dollap \fi}
\unexpanded\def\clap{\ifmmode \@EA\domathclap \else \@EA\doclap \fi}

Cheers, Taco

More information about the dev-context mailing list