ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Giuseppe Bilotta" <oblomov@freemail.it>
Cc: "ConTeXt" <ntg-context@ntg.nl>
Subject: Re: Comments on \defineshortcut
Date: Fri, 2 Feb 2001 22:47:23 +0100	[thread overview]
Message-ID: <008701c08d62$08079540$a3ccfea9@nuovo> (raw)
In-Reply-To: <3.0.6.32.20010202100725.019aa100@server-1>

> At 01:16 PM 2/1/01 +0100, Giuseppe Bilotta wrote:
> >Hello, I'm playing with shortcuts now, and I found some limitations on the
> >current implementation.
> >
> >It's impossible to re-define shortcuts other than <>; the reason is that,
> once I
> >issue
> >
> >\defineshortcut [()][a][style=\overstrike]
> >
> >I cannot issue
> >
> >\defineshortcut [()][b][style=\underline]
> >
> >later because an "undefined control sequence" error is issued.
>
> \def\dodefineshortcut[#1][#2][#3]%
>   {\ifthirdargument
>      \ConvertConstantAfter\doifelse{#1}{}
>        {\dododefineshortcut[<>][#2][#3]}
>        {\dododefineshortcut[#1][#2][#3]}%
>    \else\ifsecondargument
>      \dododefineshortcut[<>][#1][#2]%
>    \else
>      \dododefineshortcut[<>][][#1]%
>    \fi\fi}
>

Will patch, recreate and test ASAP.

>
> >Second problem: ligs fail in some cases (if I \defineshortcut
> >[--][o][style\overstrike] then the following lines misses a few beats:
> >
> >it seems -o:to work- well--does it?---really?
>
> see it this way: in --- the first - picks up everything uuntil the next -
> so the third - triggers a new - which cannot find its matching -
>

even the -- lig is lost, anyway. But never mind:

> >Third problem: math fails too:
> >>
> >$(a+b)/(a-c-d)_{a+b}$
> >with -- and ++ defined as shortcuts fail (not on parenthesis, if I make those
> >active too; depends on the fact that parenthesis are delimiters in math
> mode?)
>
> Hm, this works ok here, unless of course you redefine + a few times since
> then the last meaning is used.
>
> \defineshortcut[++]  saves the old meaning which is +
> \defineshortcut[++]  saves th eole meaning which is shortcut
>
> and in math mode the second one is used which means that the first shortcut
> is invokes.
>

Maybe then saving should check if the old meaning was already a shortcut ... if
this is doable.

> PS. Actually i implemented shortcuts as a kind of joke.

Such a pity it's only a joke :-). They are very good for fast typing ...

Thanks very much

Giuseppe Bilotta

Using Microsoft products is like
having sex without condoms---but
much less pleasurable


  reply	other threads:[~2001-02-02 21:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-01 12:16 Giuseppe Bilotta
2001-02-02  9:07 ` Hans Hagen
2001-02-02 21:47   ` Giuseppe Bilotta [this message]
2001-02-04 17:52     ` Hans Hagen
2001-02-04 17:53     ` Hans Hagen
2001-02-02 23:18   ` Giuseppe Bilotta

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='008701c08d62$08079540$a3ccfea9@nuovo' \
    --to=oblomov@freemail.it \
    --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).