From: Hans Hagen <pragma@wxs.nl>
Subject: Re: extentable arrows
Date: Thu, 29 Jun 2006 10:25:48 +0200 [thread overview]
Message-ID: <44A38E8C.9030508@wxs.nl> (raw)
In-Reply-To: <Pine.WNT.4.63.0606281916510.192@nqvgln>
Aditya Mahajan wrote:
>
> The syntax can be made identical (even better) than that of amsmath.
>
> \def\xrightarrow{\dosingleempty\doxrightarrow}
>
> \def\xleftarrow {\dosingleempty\doxleftarrow}
>
> \def\doxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
>
> \def\doxleftarrow[#1]{\dodoublegroupempty\dodoxleftarrow{#1}}
>
> \def\dodoxrightarrow#1#2{\mathrel
> {{\domthxarr0359\rightarrowfill{#1}{#2}}}}
>
> \def\dodoxleftarrow#1#2{\mathrel
> {{\domthxarr3095\leftarrowfill{#1}{#2}}}}
>
> \starttext
> $$
> A \xrightarrow[]{stuff on top} B
> $$
>
> $$
> A \xrightarrow[stuff below]{} B
> $$
>
> \startformula
> A \xleftarrow[stuff below]{stuff on top} B
> \stopformula
>
> $$
> A \xleftarrow B
> $$
> $$
> \rightarrow A \xrightarrow{stuff on top} B \leftarrow
> $$
>
>
> $$
> \rightarrow A \xleftarrow[stuff below] B \leftarrow
> $$
>
> \stoptext
>
hm, this is not the context way, two equal kind of contents and then one
of them in [], maybe
\def\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
\def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}
\def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
\def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }
\def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
\def\noxleftarrow [#1]{\dodoublegroupempty\dodoxleftarrow {#1}}
which accepts
\xrightarrow{x}{y}
\xrightarrow{x}
\xrightarrow{}{y}
\xrightarrow[x]{y}
etc, actyally, we should then also accept
\xrightarrow[x][y]
but more interesting is to use the optional arg for tuning purposes
\if0#1\else\mkern#1mu\fi
test, does a \mkern0mu hurt?
>
> Will make copy paste a bit easier! Though these days I find myself
> writing more in context and soon will face the reverse problem. I will
> need to copy context math into latex (needed for final journal
> submission) and some of the math features are simply missing from
> latex :)
>
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
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-06-29 8:25 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
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 [this message]
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=44A38E8C.9030508@wxs.nl \
--to=pragma@wxs.nl \
--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).