Re: [NTG-context] Strange behavior of a macro
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 ___
[NTG-context] Strange behavior of a macro
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 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 ___ 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 ___
Re: [NTG-context] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta
HiRik, Sorry, I do not know how I could replace b with B! I did not think to check because this macro worked very well so far Thank you, Fabrice ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta
Hi, Macro written by Hans does not work. Best regards, Fabrice % macros=mkvi \starttext \starttexdefinition MyOtherHeader #where #day #month #year #title \defineoverlay[whatever][\useMPgraphic{whatever}] \startuseMPgraphic{whatever} path p; p:=fullsquare xyscaled (\overlaywidth,\overlayheight) squeezed 1pt; fill p withcolor white ; draw p withpen pencircle scaled 2pt withcolor 0.625white ; picture d ; d := textext(\quad#where\space\endash\space\date[d=#day,m=#month,y=#year]\quad) shifted .5[ulcorner p,urcorner p]; fill boundingbox d withcolor white ; draw d ; setbounds currentpicture to p ; \stopuseMPgraphic \framed [ width=\hsize, height=5em, foregroundstyle=\itx, Background=whatever, frame=off, ] {#title } \stoptexdefinition \MyOtherHeader{Premières STMGB-STMGD}{17}{11}{2014}{{\ss \tfb \bf Second degré : résolution d'une équation du second degré}} \stoptext ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange behavior of a macro with ConTeXt ver : 2014.11.12 9:46 p.m. MKIV beta
On 2014-11-15 06:18, Fabrice Couvreur wrote: Background=whatever, Please change B to b and retry. -- rik ___ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___