ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Giuseppe Bilotta <gip.bilotta@iol.it>
Subject: Re: Re: Re: nath catcode issues
Date: Sat, 7 Aug 2004 16:58:24 +0200	[thread overview]
Message-ID: <1946029967.20040807165824@iol.it> (raw)
In-Reply-To: <20040705124217.GB2605@puritan.pcp.ath.cx>

Monday, July 5, 2004 Nikolai Weibull wrote:

> * Giuseppe Bilotta <gip.bilotta@iol.it> [Jul 05, 2004 14:00]:
>> Weird indeed. I'm not using the latest ConTeXt. (Actually I'm
>> quite back with the updates ... gotta get down to it.) I'll see
>> if upgrading gives me the same problem and in case get a fix.

> OK.

I'm now using

ConTeXt  ver: 2004.6.30  fmt: 2004.7.27  int: english  mes: english

and your example

\usemodule[nath]

\starttext

$a, b, \dots, n$
\[
a=b, \dots c=d \dots
\]
\stoptext

uses, in order, \ldots, \ldots, \cdots which sounds like the
correct behaviour to me. The engine is

This is pdfeTeX, Version 3.141592-1.20a-rc4-2.1 (MiKTeX 2.4)


>> >> \def\over{\ifmmode\n@err{Disabled command \string\over }
>> >>  {No more a valid command. Replace {A \over B} with \frac A
>> >>  B.}\else\o@over\fi}
>> >> \def\atop{\ifmmode\n@err{Disabled command \string\atop }
>> >>  {No more a valid command. Use array instead.}\else\o@atop\fi}
>> >> \def\choose{\ifmmode\n@err{Disabled command \string\choose }
>> >>  {No more a valid command. Replace {A \choose B} with \binom A
>> >>  B.}\else\o@choose\fi}
>>
>> > Ah, of course...
>> > 	nikolai
>>
>> It works like that? Excellent.

> It seems I spoke too soon.  It does in fact not work.  \o@over can't be
> put like that inside the if-statement.  A suggestion would be to re-work
> the whole section and instead make it

> \appendtoks
> \def\over{\n@err{Disabled command \string\over }
>  {No more a valid command. Replace {A \string\over B} with \string\frac A B.}}
> \def\atop{\n@err{Disabled command \string\atop }
>  {No more a valid command. Use array instead.}}
> \def\choose{\n@err{Disabled command \string\choose }
>  {No more a valid command. Replace {A \string\choose B}
> with \string\binom A B. >>> }}
> \to\everymath

> but I don't know if that's a good solution.  It forces you to use
> \string\over in the second argument to \n@err which I don't understand
> why, but otherwise TeX runs out of stack space.  I suppose it's being
> expanded even though it shouldn't be.
> 	nikolai

Also, I'm not sure that will work with text inside math. Can
you design a small test case that uses \over (directly or
indirectly) in normal text and in some \text inside a math
environment so that I can see what solution works fine?

In the meantime, I'm thinking along the lines of something like

\def\over{%
 \ifmmode\n@err{Disabled command \string\over }
  {No more a valid command. Replace {A \over B} with \frac A B.}%
  \let\next\relax
 \else\let\next\o@over\fi\next}
\def\atop{%
 \ifmmode\n@err{Disabled command \string\atop }
  {No more a valid command. Use array instead.}%
  \let\next\relax
 \else\let\next\o@atop\fi\next}
\def\choose{%
 \ifmmode\n@err{Disabled command \string\choose }
  {No more a valid command. Replace {A \choose B} with \binom A B.}%
  \lext\next\relax
 \else\let\next\o@choose\fi\next}

which should be robust enough. Can you try it in the context
where my previous solution busted?

-- 
Giuseppe "Oblomov" Bilotta

  reply	other threads:[~2004-08-07 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04 13:36 Nikolai Weibull
2004-07-05 10:01 ` Giuseppe Bilotta
2004-07-05 10:44   ` Nikolai Weibull
2004-07-05 11:03     ` Giuseppe Bilotta
2004-07-05 12:42       ` Nikolai Weibull
2004-08-07 14:58         ` Giuseppe Bilotta [this message]
2004-08-08 19:28           ` Nikolai Weibull
2004-08-25 18:29             ` 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=1946029967.20040807165824@iol.it \
    --to=gip.bilotta@iol.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).