ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: extentable arrows
Date: Wed, 28 Jun 2006 23:58:55 +0200	[thread overview]
Message-ID: <44A2FB9F.7070006@elvenkind.com> (raw)
In-Reply-To: <Pine.WNT.4.63.0606281632440.1512@nqvgln>

Aditya Mahajan wrote:
> \xrightarrow{big superscipt}
> 
> Any suggestions?


Not completely identical, but similar.

Cheers, Taco



\def\domthxarr#1#2#3#4#5#6#7%
   {\begingroup
    \mathsurround\zeropoint
    \setbox0\hbox{$\scriptstyle
                   \if0#1\else\mkern#1mu\fi
                   \mkern#3mu#7\mkern#4mu
                   \if0#2\else\mkern#2mu\fi $}%
    \setbox4\hbox{#5}%
    \dimen0\wd0
    \ifdim\wd4>\dimen0 \dimen0\wd4 \fi
    \setbox2\hbox{$\scriptstyle
                  \if0#1\else\mkern#1mu\fi
                  \mkern#3mu#6\mkern#4mu
                  \if0#2\else\mkern#2mu\fi $}%
    \ifdim\wd2>\dimen0 \dimen0\wd2 \fi
    \setbox4\hbox to \dimen0{#5}%
    \mathord{\vcenter{{\offinterlineskip
      \hbox to \dimen0{\hss\box0\hss}%
      \kern .2ex
      \hbox to \dimen0{\hss\copy4\hss}%
      \kern .2ex
      \hbox to \dimen0{\hss\box2\hss}}}}%
    \endgroup}

\def\xrightarrow{\dodoubleempty\doxrightarrow }

\def\xleftarrow {\dodoubleempty\doxleftarrow }

\def\doxrightarrow[#1][#2]{\mathrel
   {{\domthxarr0359\rightarrowfill{#1}{#2}}}}

\def\doxleftarrow[#1][#2]{\mathrel
   {{\domthxarr3095\leftarrowfill{#1}{#2}}}}


\starttext
$$
A \xrightarrow[][stuff on top] B
$$


$$
A \xleftarrow[stuff below][stuff on top] B
$$

$$
A \xleftarrow B
$$

\stoptext

  parent reply	other threads:[~2006-06-28 21:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 20:56 Aditya Mahajan
2006-06-28 21:24 ` Aditya Mahajan
2006-06-28 21:58 ` Taco Hoekwater [this message]
2006-06-28 23:07   ` Aditya Mahajan
2006-06-29  9:02     ` Hans Hagen
2006-06-28 23:21   ` Aditya Mahajan
2006-06-29  8:07     ` Taco Hoekwater
2006-06-29  8:25     ` Hans Hagen
2006-06-29 14:56       ` Aditya Mahajan

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=44A2FB9F.7070006@elvenkind.com \
    --to=taco@elvenkind.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).