ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: \overleftrightarrow
Date: Sat, 30 Jun 2007 10:47:05 +0200	[thread overview]
Message-ID: <6faad9f00706300147l2a333998t7f6c3ef0fd2607be@mail.gmail.com> (raw)
In-Reply-To: <alpine.WNT.0.999.0706282317540.3712@nqvgln>

On 6/29/07, Aditya Mahajan wrote:
> Actually just adding overleftrightarrow is easy, but better will be an
> interface to easily define such commands. So ....
>
> > If not, what can I do so that I can use it?
>
> ConTeXt uses overleftarrow and overrightarrow as defined in plain
> tex. This does not work in subscripts.
>
> $\overleftarrow{A}$ $\overleftarrow{ABC}$
> $a_{\overleftarrow{A}}$ $b_{\overleftarrow{ABC}}$
>
> Here is a solution. First we patch math-ext so that arrowfills take a
> style.

/.../

Wow! Aditya, thanks a lot! I didn't do any extensive testing, but the
functionality should really end up in the core (including the added
bonus if possible ;).

> As an added bonus:
>
> \definemathoverarrow [overtwoheadrightarrow]      [\twoheadrightarrowfill]
> \definemathoverarrow [overtwoheadleftarrow]       [\twoheadleftarrowfill]
> \definemathoverarrow [overrightharpoondown] [1pt] [\rightharpoondownfill]
> \definemathoverarrow [overrightharpoonup]         [\rightharpoonupfill]
> \definemathoverarrow [overleftharpoondown]  [1pt] [\leftharpoondownfill]
> \definemathoverarrow [overleftharpoonup]          [\leftharpoonupfill]
>
> $\overtwoheadrightarrow  {XYZ}$
> $\overtwoheadleftarrow   {XYZ}$
> $\overrightharpoondown   {XYZ}$
> $\overrightharpoonup     {XYZ}$
> $\overleftharpoondown    {XYZ}$
> $\overleftharpoonup      {XYZ}$
>
> There are also underarrows, which will not be too hard to do. I will
> patch math-ext with both overarrows and underarrows. I think that
> there needs to be some "italic correction" for the arrow. It is
> centered on the math box, but the math box is tilted to the right. Any
> way to determine the "correct" horizontal skip that should be added.
>
> Mojca, I remember that you had some trouble with overharpoons. Does
> this take care of that?

\vec is not good for two reasons:

a) often stretchable arrows are needed (vectors both over single
letters and things like {AB} are mixed, and \vec looks really weird in
cases where letters are longer, or when we have combinations of them)

b) vectors should be harpoons (not arrows) according to our conventions.


My old \overrightharpoonup definitions had two other problems:

c) scalability/interfering with style change: you solved exactly that
one in a really nice way - thanks a lot (I did patch it, but it looked
like really ugly code)

d) glyphs themselves and their size (probably only the Polish guys can
help here) - and that's the real problem at the moment

Consider
\def\myvec#1{\overrightharpoonup{#1}}
$(\myvec{\imath},\myvec{\jmath},\myvec{k})$ or $\myvec{\nabla}$,
$\myvec{\sigma}$, $\myvec{r}$, ...
The base size on top of i, j, k, ... is just too long and the harpoon
is also slightly too big.

----

But to sum up: I really like your patch, and I vote for its inclusion.
(The most annoying problem is stil open though.)

Thanks a lot,
     Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2007-06-30  8:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  0:50 \overleftrightarrow Jesse Alama
2007-06-29  3:31 ` \overleftrightarrow Aditya Mahajan
2007-06-30  8:47   ` Mojca Miklavec [this message]
2007-07-01 16:29     ` \overleftrightarrow Hans Hagen
2007-07-19  7:01     ` \overleftrightarrow Aditya Mahajan
2007-07-19 15:42       ` overleftrightarrow Aditya Mahajan
2007-07-11 18:33   ` \overleftrightarrow Jesse Alama
2007-07-11 18:42     ` \overleftrightarrow Aditya Mahajan
2007-07-11 18:57       ` \overleftrightarrow Jesse Alama

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00706300147l2a333998t7f6c3ef0fd2607be@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).