On Thu, 19 Apr 2007, Hans Hagen wrote:

> Taco Hoekwater wrote:
>> 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
>>    {\flushnextbox\normalhss}\endgroup}\normalhbox}
>>
>> \def\dollap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
>>    {\normalhss\flushnextbox}\endgroup}\normalhbox}
>>
>> \def\doclap{\begingroup\dowithnextbox{\normalhbox to \zeropoint
>>    {\normalhss\flushnextbox\normalhss}\endgroup}\normalhbox}
>>
>> \def\domathclap{\mathpalette\dodomathclap}
>> [EMAIL PROTECTED]
>>
>> \def\domathllap{\mathpalette\dodomathllap}
>> [EMAIL PROTECTED]
>>
>> \def\domathrlap{\mathpalette\dodomathrlap}
>> [EMAIL PROTECTED]
>>
>> \unexpanded\def\rlap{\ifmmode [EMAIL PROTECTED] \else [EMAIL PROTECTED] \fi}
>> \unexpanded\def\llap{\ifmmode [EMAIL PROTECTED] \else [EMAIL PROTECTED] \fi}
>> \unexpanded\def\clap{\ifmmode [EMAIL PROTECTED] \else [EMAIL PROTECTED] \fi}
>>
>>
> or
>
> \unexpanded\def\rlap{\mathortext\domathrlap\dorlap}
> \unexpanded\def\llap{\mathortext\domathllap\dollap}
> \unexpanded\def\clap{\mathortext\domathclap\doclap}
>
> before i add this, we need to be sure that llap/rlap are not used in
> math constructs which expect it to behave like an hbox

Maybe change \dorlap to \dotextrlap. Remembering that \dotextrlap is 
for text mode and \domathrlap is for math mode is easier than 
remembering the difference between \dorlap and \domathrlap.

Does it make sense to make tlap and blap behave in the same way? I do 
not know of any advantage of them right away, but it may be better to 
be consistent with all commands of one 'category'.

Aditya


_______________________________________________
dev-context mailing list
dev-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/dev-context

Reply via email to