[dev-context] My way on matharrows
Hans Hagen
pragma at wxs.nl
Wed Jul 19 11:24:28 CEST 2006
Taco Hoekwater 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.
>>
>
> In the interest of porting stuff from amstex, changing the behaviour is
> probably better.
>
\def\dodoxmtharrow[#1,#2,#3][#4,#5,#6][#7]#8#9% [3] is the optional arg
{\ifx#2\empty
\ifsecondargument
\mathrel{\domthxarrsingle{#7}{#1}{#4}{#8}{#9}}%
\else
\mathrel{\domthxarrsingle{#7}{#1}{#4}{}{#8}}%
\fi
\else
\ifsecondargument
\mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{#8}{#9}}%
\else
\mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{}{#8}}%
\fi
\fi}
>
>> 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?
>>
>
> something should be possible with mathcollections, I guess?
> (Hans knows this better then I do)
>
>
it's font related, not collection related; the problem with these things
is that in context we want to deal with mixed math font usage so we need
to figure out a clever way
>> I could not correct leftrightharpoons. Why does this not work?
>>
>> \definematharrow [xleftrightharpoons] [3395,3359]
>> [\leftharpoonupfill,\rightharpoondownfill]
>>
>
> Because the current definition of dodoxmtharrow does not like it
> when the second arg starts with two identical digits. Changing
> it to this fixes the problem:
>
> \def\dodoxmtharrow[#1,#2,#3][#4,#5,#6][#7]#8#9%
> {\edef\tempa{#2}\ifx\tempa\empty %TH changed line
> \mathrel{\domthxarrsingle{#7}{#1}{#4}{#8}{#9}}%
> \else
> \mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{#8}{#9}}%
> \fi}
>
>
ok, so we get
\def\dodoxmtharrow[#1,#2,#3][#4,#5,#6][#7]#8#9% [3] is the optional arg
{\edef\!!string{#2}%
\ifx\!!stringa\empty
\ifsecondargument
\mathrel{\domthxarrsingle{#7}{#1}{#4}{#8}{#9}}%
\else
\mathrel{\domthxarrsingle{#7}{#1}{#4}{}{#8}}%
\fi
\else
\ifsecondargument
\mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{#8}{#9}}%
\else
\mathrel{\domthxarrdouble{#7}{#1}{#2}{#4}{#5}{}{#8}}%
\fi
\fi}
Hans
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
More information about the dev-context
mailing list