ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Strange behavior of a macro
@ 2021-08-16 14:28 Fabrice Couvreur via ntg-context
  2021-08-16 14:45 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Couvreur via ntg-context @ 2021-08-16 14:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Fabrice Couvreur


[-- Attachment #1.1: Type: text/plain, Size: 1815 bytes --]

Hello,
I don't understand why this macro works with this simple example but return
the following error if I use it for chapters in my book.
Thanks
Fabrice

%%%%
\setupbodyfont
   [newcomputermodern-book,11pt]

\unexpanded\def\N{\math{\mathbb{N}}\autoinsertnextspace}

\defineenumeration
   [test]
   [title=yes,
    text={Test},
    style=italic]

\starttext
\N
\starttest
\m{\forall n \in \N}
\stoptest
\stoptext

%%%%
tex error       > tex error on line 64 in file ./terminale_suites_2.tex:
Use of \N doesn't match its definition



<line 3.64>
              Soient \u, \v deux suites définies sur \N,
     \m{l} et \m{l'} deux réels.

54                 \startitem
55                   \u converge vers \m{l},
56                 \stopitem
57               \stopitemize
58               alors \m{l\geqslant 0}.
59             \stopproposition
60             \startremarque
61               Nous retiendrons que le passage à la limite sur une
inégalité stricte restitue une inégalité large.
62             \stopremarque
63             \startcorollaire
64 >>            Soient \u, \v deux suites définies sur \N, \m{l} et \m{l'}
deux réels.
65
66               Si
67
68               \startitemize
69                 \startitem
70                   les suites \u et \v convergent respectivement vers
\m{l} et \m{l'},
71                 \stopitem
72                 \startitem
73                   \m{\forall n \in\mathbb{N}, \thinspace u_n>v_n},
74                 \stopitem
If you say, e.g., '\def\a1{...}', then you must always put '1' after '\a',
since control sequence names are made up of letters only. The macro here
has not
been followed by the required stuff, so I'm ignoring it.
mtx-context     | fatal error: return code: 256
%%%%

[-- Attachment #1.2: Type: text/html, Size: 3511 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Strange behavior of a macro
  2021-08-16 14:28 Strange behavior of a macro Fabrice Couvreur via ntg-context
@ 2021-08-16 14:45 ` Hans Hagen via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen via ntg-context @ 2021-08-16 14:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen

On 8/16/2021 4:28 PM, Fabrice Couvreur via ntg-context wrote:
> Hello,
> I don't understand why this macro works with this simple example but 
> return the following error if I use it for chapters in my book.
> Thanks
> Fabrice
> 
> %%%%
> \setupbodyfont
>     [newcomputermodern-book,11pt]
> 
> \unexpanded\def\N{\math{\mathbb{N}}\autoinsertnextspace}
> 
> \defineenumeration
>     [test]
>     [title=yes,
>      text={Test},
>      style=italic]
> 
> \starttext
> \N
> \starttest
> \m{\forall n \in \N}
> \stoptest
> \stoptext
> 
> %%%%
> tex error       > tex error on line 64 in file ./terminale_suites_2.tex: 
> Use of \N doesn't match its definition
maybe it gets redefined someplace?

just before the error you can say

\show\N or \meaning\N or \tracingall and see what the machinery expects

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-16 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 14:28 Strange behavior of a macro Fabrice Couvreur via ntg-context
2021-08-16 14:45 ` Hans Hagen via ntg-context

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).