[dev-context] My way on matharrows

Aditya Mahajan adityam at umich.edu
Wed Jul 19 16:51:37 CEST 2006


On Wed, 19 Jul 2006, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> Hi,
>>
>>  I am attaching myway on using matharrow. Are there any suggestions before 
>> I release it to public?
>> 
>> I found some surprises while making this my way.
>> 
>> 1. Somewhere along the line of development, \xrightarrow{text} changed to 
>> placing text at the bottom of the arrow (rather than the top as in amstex). 
>> This is not a bug, just something that works differently. Should this be 
>> changed? These arrow definitions are pretty new, so I do not think that a 
>> change at this stage will effect too many users. It may not be possible to 
>> change later for compatibility reasons.
>> 
>> 2. Something goes wrong with palatino (used by mag-01). Have a look at the 
>> \xmapsto and \xrightleftharpoons and \xleftrightharpoons in the pdf. 
>> \xmapsto can be corrected by changing its defintion to
>> 
>> \definematharrow [xmapsto]            [3599] [\mapstofill]
>> 
>> Basically, providing a bit more cusion on the left, so that the middle 
>> \relbar not overlap the \mapstochar.
>> 
>> Should this definition go to math-ext.tex or to something specific to 
>> palatino. I have not tested with other fonts, but what is the general 
>> strategy when definitions differ for different fonts?
>> 
>> I could not correct leftrightharpoons. Why does this not work?
>> 
>> \definematharrow [xleftrightharpoons] [3395,3359] 
>> [\leftharpoonupfill,\rightharpoondownfill]
>> 
>> \starttext
>> \math{\xleftrightharpoons}
>> \stoptext
>> 
>
> ok, a dirty trick: when no third arg, then one redefines the dimensions

Great. Now we can redefine arrows in font specific scenarios. For 
mapsto I think that a global redefinition in math-ext to

\definematharrow [xmapsto]            [3599] [\mapstofill]

works fine for lm, palatino and times. For leftrightharpoons, I need 
more time to come up with something that is suitable for all fonts. If 
nothing works out, only then we would need to do font specific 
behaviour (I wish to avoid that, if possible.)

For all this trouble, here are some bonus arrows :-)

\def\hookleftfill  {\mtharrowfill \leftarrow \relbar {\relbar\joinrel\rhook}}

\def\hookrightfill {\mtharrowfill {\lhook\joinrel\relbar} \relbar \rightarrow}

\definematharrow [xhookleftarrow]  [3095] [\hookleftfill]
\definematharrow [xhookrightarrow] [0395] [\hookrightfill]


Aditya



More information about the dev-context mailing list