ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* macro that does not work (Metapost)
@ 2020-02-11 10:50 Fabrice Couvreur
  2020-02-11 12:08 ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2020-02-11 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,
I have some problems with the following macro :

tex error       > mp error on line 23 in file /home/viserion/macro.tex:

! Missing argument to suite.
<to be read again>
{
<*> suite{
1,0}; suite(2,1); ;
That macro has more parameters than you thought.
I'll continue by pretending that each missing argument
is either zero or null.

! Missing argument to suite.
<to be read again>
{
<*> suite{
1,0}; suite(2,1); ;
That macro has more parameters than you thought.
I'll continue by pretending that each missing argument
is either zero or null.

! Extra tokens will be flushed.
<to be read again>
{
<*> suite{
1,0}; suite(2,1); ;
I've just read as much of that statement as I could fathom,
so a semicolon should have been next. It's very puzzling...
but I'll try to get myself back together, by ignoring
everything up to the next `;'. Please insert a semicolon
now in front of anything that you don't want me to delete.
(See Chapter 27 of The METAFONTbook for an example.)

[1]

13       enddef;
14     \stopMPcode
15     \starttext
16      On présente ci-dessous deux suites de dessins.
17           \startlinecorrection[blank]
18             \startmidaligned
19               \startcombination[2*1]
20                 {\startMPcode
21                   suite{1,0};
22                   suite(2,1);
23 >>               \stopMPcode}{\tfxx \bf Suite 2}
24           \stopcombination
25             \stopmidaligned
26           \stoplinecorrection
27     \stoptext

mtx-context     | fatal error: return code: 256

TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53

##################################################
macro.tex
##################################################

\startMPcode
  def suite (expr n, t) =
  begingroup
   numeric u;
   u := 5mm;
   pickup pencircle scaled 4pt;
   for i=0 upto n:
     for j=0 upto n:
         drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
     endfor
   endfor
  endgroup
  enddef;
\stopMPcode
\starttext
 On présente ci-dessous deux suites de dessins.
      \startlinecorrection[blank]
        \startmidaligned
          \startcombination[2*1]
            {\startMPcode
              suite{1,0};
              suite(2,1);
             \stopMPcode}{\tfxx \bf Suite 2}
      \stopcombination
        \stopmidaligned
      \stoplinecorrection
\stoptext


Thank you.
Fabrice

[-- Attachment #1.2: Type: text/html, Size: 4885 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] 5+ messages in thread

* Re: macro that does not work (Metapost)
  2020-02-11 10:50 macro that does not work (Metapost) Fabrice Couvreur
@ 2020-02-11 12:08 ` Hans Hagen
  2020-02-11 12:19   ` Fabrice Couvreur
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2020-02-11 12:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2/11/2020 11:50 AM, Fabrice Couvreur wrote:
> Hi,
> I have some problems with the following macro :
> 
> tex error       > mp error on line 23 in file /home/viserion/macro.tex:
> 
> ! Missing argument to suite.
> <to be read again>
> {
> <*> suite{
> 1,0}; suite(2,1); ;
> That macro has more parameters than you thought.
> I'll continue by pretending that each missing argument
> is either zero or null.
> 
> ! Missing argument to suite.
> <to be read again>
> {
> <*> suite{
> 1,0}; suite(2,1); ;
> That macro has more parameters than you thought.
> I'll continue by pretending that each missing argument
> is either zero or null.


{} instead of ()

> ! Extra tokens will be flushed.
> <to be read again>
> {
> <*> suite{
> 1,0}; suite(2,1); ;
> I've just read as much of that statement as I could fathom,
> so a semicolon should have been next. It's very puzzling...
> but I'll try to get myself back together, by ignoring
> everything up to the next `;'. Please insert a semicolon
> now in front of anything that you don't want me to delete.
> (See Chapter 27 of The METAFONTbook for an example.)
> 
> [1]
> 
> 13       enddef;
> 14     \stopMPcode
> 15     \starttext
> 16      On présente ci-dessous deux suites de dessins.
> 17           \startlinecorrection[blank]
> 18             \startmidaligned
> 19               \startcombination[2*1]
> 20                 {\startMPcode
> 21                   suite{1,0};
> 22                   suite(2,1);
> 23 >>               \stopMPcode}{\tfxx \bf Suite 2}
> 24           \stopcombination
> 25             \stopmidaligned
> 26           \stoplinecorrection
> 27     \stoptext
> 
> mtx-context     | fatal error: return code: 256
> 
> TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53
> 
> ##################################################
> macro.tex
> ##################################################
> 
> \startMPcode
>    def suite (expr n, t) =
>    begingroup
>     numeric u;
>     u := 5mm;
>     pickup pencircle scaled 4pt;
>     for i=0 upto n:
>       for j=0 upto n:
>           drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
>       endfor
>     endfor
>    endgroup
>    enddef;
> \stopMPcode
> \starttext
>   On présente ci-dessous deux suites de dessins.
>        \startlinecorrection[blank]
>          \startmidaligned
>            \startcombination[2*1]
>              {\startMPcode
>                suite{1,0};
>                suite(2,1);
>               \stopMPcode}{\tfxx \bf Suite 2}
>        \stopcombination
>          \stopmidaligned
>        \stoplinecorrection
> \stoptext
> 
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           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] 5+ messages in thread

* Re: macro that does not work (Metapost)
  2020-02-11 12:08 ` Hans Hagen
@ 2020-02-11 12:19   ` Fabrice Couvreur
  2020-02-11 13:00     ` Mikael P. Sundqvist
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Couvreur @ 2020-02-11 12:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Hans,
I tried this but without success :

 \startMPcode
     suite{1,0};
     suite{2,1};
 \stopMPcode

Fabrice

Le mar. 11 févr. 2020 à 13:08, Hans Hagen <j.hagen@xs4all.nl> a écrit :

> On 2/11/2020 11:50 AM, Fabrice Couvreur wrote:
> > Hi,
> > I have some problems with the following macro :
> >
> > tex error       > mp error on line 23 in file /home/viserion/macro.tex:
> >
> > ! Missing argument to suite.
> > <to be read again>
> > {
> > <*> suite{
> > 1,0}; suite(2,1); ;
> > That macro has more parameters than you thought.
> > I'll continue by pretending that each missing argument
> > is either zero or null.
> >
> > ! Missing argument to suite.
> > <to be read again>
> > {
> > <*> suite{
> > 1,0}; suite(2,1); ;
> > That macro has more parameters than you thought.
> > I'll continue by pretending that each missing argument
> > is either zero or null.
>
>
> {} instead of ()
>
> > ! Extra tokens will be flushed.
> > <to be read again>
> > {
> > <*> suite{
> > 1,0}; suite(2,1); ;
> > I've just read as much of that statement as I could fathom,
> > so a semicolon should have been next. It's very puzzling...
> > but I'll try to get myself back together, by ignoring
> > everything up to the next `;'. Please insert a semicolon
> > now in front of anything that you don't want me to delete.
> > (See Chapter 27 of The METAFONTbook for an example.)
> >
> > [1]
> >
> > 13       enddef;
> > 14     \stopMPcode
> > 15     \starttext
> > 16      On présente ci-dessous deux suites de dessins.
> > 17           \startlinecorrection[blank]
> > 18             \startmidaligned
> > 19               \startcombination[2*1]
> > 20                 {\startMPcode
> > 21                   suite{1,0};
> > 22                   suite(2,1);
> > 23 >>               \stopMPcode}{\tfxx \bf Suite 2}
> > 24           \stopcombination
> > 25             \stopmidaligned
> > 26           \stoplinecorrection
> > 27     \stoptext
> >
> > mtx-context     | fatal error: return code: 256
> >
> > TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53
> >
> > ##################################################
> > macro.tex
> > ##################################################
> >
> > \startMPcode
> >    def suite (expr n, t) =
> >    begingroup
> >     numeric u;
> >     u := 5mm;
> >     pickup pencircle scaled 4pt;
> >     for i=0 upto n:
> >       for j=0 upto n:
> >           drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
> >       endfor
> >     endfor
> >    endgroup
> >    enddef;
> > \stopMPcode
> > \starttext
> >   On présente ci-dessous deux suites de dessins.
> >        \startlinecorrection[blank]
> >          \startmidaligned
> >            \startcombination[2*1]
> >              {\startMPcode
> >                suite{1,0};
> >                suite(2,1);
> >               \stopMPcode}{\tfxx \bf Suite 2}
> >        \stopcombination
> >          \stopmidaligned
> >        \stoplinecorrection
> > \stoptext
> >
> >
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> >
> ___________________________________________________________________________________
> >
>
>
> --
>
> -----------------------------------------------------------------
>                                            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
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 7950 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] 5+ messages in thread

* Re: macro that does not work (Metapost)
  2020-02-11 12:19   ` Fabrice Couvreur
@ 2020-02-11 13:00     ` Mikael P. Sundqvist
  2020-02-11 20:40       ` Fabrice Couvreur
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael P. Sundqvist @ 2020-02-11 13:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Tue, Feb 11, 2020 at 1:22 PM Fabrice Couvreur <
fabrice1.couvreur@gmail.com> wrote:

> Hi Hans,
> I tried this but without success :
>
>  \startMPcode
>      suite{1,0};
>      suite{2,1};
>  \stopMPcode
>
> Fabrice
>
> Le mar. 11 févr. 2020 à 13:08, Hans Hagen <j.hagen@xs4all.nl> a écrit :
>
>> On 2/11/2020 11:50 AM, Fabrice Couvreur wrote:
>> > Hi,
>> > I have some problems with the following macro :
>> >
>> > tex error       > mp error on line 23 in file /home/viserion/macro.tex:
>> >
>> > ! Missing argument to suite.
>> > <to be read again>
>> > {
>> > <*> suite{
>> > 1,0}; suite(2,1); ;
>> > That macro has more parameters than you thought.
>> > I'll continue by pretending that each missing argument
>> > is either zero or null.
>> >
>> > ! Missing argument to suite.
>> > <to be read again>
>> > {
>> > <*> suite{
>> > 1,0}; suite(2,1); ;
>> > That macro has more parameters than you thought.
>> > I'll continue by pretending that each missing argument
>> > is either zero or null.
>>
>>
>> {} instead of ()
>>
>> > ! Extra tokens will be flushed.
>> > <to be read again>
>> > {
>> > <*> suite{
>> > 1,0}; suite(2,1); ;
>> > I've just read as much of that statement as I could fathom,
>> > so a semicolon should have been next. It's very puzzling...
>> > but I'll try to get myself back together, by ignoring
>> > everything up to the next `;'. Please insert a semicolon
>> > now in front of anything that you don't want me to delete.
>> > (See Chapter 27 of The METAFONTbook for an example.)
>> >
>> > [1]
>> >
>> > 13       enddef;
>> > 14     \stopMPcode
>> > 15     \starttext
>> > 16      On présente ci-dessous deux suites de dessins.
>> > 17           \startlinecorrection[blank]
>> > 18             \startmidaligned
>> > 19               \startcombination[2*1]
>> > 20                 {\startMPcode
>> > 21                   suite{1,0};
>> > 22                   suite(2,1);
>> > 23 >>               \stopMPcode}{\tfxx \bf Suite 2}
>> > 24           \stopcombination
>> > 25             \stopmidaligned
>> > 26           \stoplinecorrection
>> > 27     \stoptext
>> >
>> > mtx-context     | fatal error: return code: 256
>> >
>> > TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53
>> >
>> > ##################################################
>> > macro.tex
>> > ##################################################
>> >
>> > \startMPcode
>> >    def suite (expr n, t) =
>> >    begingroup
>> >     numeric u;
>> >     u := 5mm;
>> >     pickup pencircle scaled 4pt;
>> >     for i=0 upto n:
>> >       for j=0 upto n:
>> >           drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
>> >       endfor
>> >     endfor
>> >    endgroup
>> >    enddef;
>> > \stopMPcode
>> > \starttext
>> >   On présente ci-dessous deux suites de dessins.
>> >        \startlinecorrection[blank]
>> >          \startmidaligned
>> >            \startcombination[2*1]
>> >              {\startMPcode
>> >                suite{1,0};
>> >                suite(2,1);
>> >               \stopMPcode}{\tfxx \bf Suite 2}
>> >        \stopcombination
>> >          \stopmidaligned
>> >        \stoplinecorrection
>> > \stoptext
>> >
>> >
>> > 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://context.aanhet.net
>> > archive  : https://bitbucket.org/phg/context-mirror/commits/
>> > wiki     : http://contextgarden.net
>> >
>> ___________________________________________________________________________________
>> >
>>
>>
>> --
>>
>> -----------------------------------------------------------------
>>                                            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
>>
>> ___________________________________________________________________________________
>>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>

I think Hans meant you should use () and not {}.

The following compiles here.

Hope it helps!

/Mikael

\startMPcode
  def suite (expr n, t) =
  begingroup
   numeric u;
   u := 5mm;
   pickup pencircle scaled 4pt;
   for i=0 upto n:
     for j=0 upto n:
         drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
     endfor
   endfor
  endgroup
  enddef;
\stopMPcode
\starttext
 On présente ci-dessous deux suites de dessins.
      \startlinecorrection[blank]
        \startmidaligned
          \startcombination[2*1]
            {\startMPcode
              suite(1,0);
              suite(2,1);
             \stopMPcode}{\tfxx \bf Suite 2}
      \stopcombination
        \stopmidaligned
      \stoplinecorrection
\stoptext

[-- Attachment #1.2: Type: text/html, Size: 9815 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] 5+ messages in thread

* Re: macro that does not work (Metapost)
  2020-02-11 13:00     ` Mikael P. Sundqvist
@ 2020-02-11 20:40       ` Fabrice Couvreur
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Couvreur @ 2020-02-11 20:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Mikael,
Thanks.
Fabrice

Le mar. 11 févr. 2020 à 14:01, Mikael P. Sundqvist <mickep@gmail.com> a
écrit :

> On Tue, Feb 11, 2020 at 1:22 PM Fabrice Couvreur <
> fabrice1.couvreur@gmail.com> wrote:
>
>> Hi Hans,
>> I tried this but without success :
>>
>>  \startMPcode
>>      suite{1,0};
>>      suite{2,1};
>>  \stopMPcode
>>
>> Fabrice
>>
>> Le mar. 11 févr. 2020 à 13:08, Hans Hagen <j.hagen@xs4all.nl> a écrit :
>>
>>> On 2/11/2020 11:50 AM, Fabrice Couvreur wrote:
>>> > Hi,
>>> > I have some problems with the following macro :
>>> >
>>> > tex error       > mp error on line 23 in file /home/viserion/macro.tex:
>>> >
>>> > ! Missing argument to suite.
>>> > <to be read again>
>>> > {
>>> > <*> suite{
>>> > 1,0}; suite(2,1); ;
>>> > That macro has more parameters than you thought.
>>> > I'll continue by pretending that each missing argument
>>> > is either zero or null.
>>> >
>>> > ! Missing argument to suite.
>>> > <to be read again>
>>> > {
>>> > <*> suite{
>>> > 1,0}; suite(2,1); ;
>>> > That macro has more parameters than you thought.
>>> > I'll continue by pretending that each missing argument
>>> > is either zero or null.
>>>
>>>
>>> {} instead of ()
>>>
>>> > ! Extra tokens will be flushed.
>>> > <to be read again>
>>> > {
>>> > <*> suite{
>>> > 1,0}; suite(2,1); ;
>>> > I've just read as much of that statement as I could fathom,
>>> > so a semicolon should have been next. It's very puzzling...
>>> > but I'll try to get myself back together, by ignoring
>>> > everything up to the next `;'. Please insert a semicolon
>>> > now in front of anything that you don't want me to delete.
>>> > (See Chapter 27 of The METAFONTbook for an example.)
>>> >
>>> > [1]
>>> >
>>> > 13       enddef;
>>> > 14     \stopMPcode
>>> > 15     \starttext
>>> > 16      On présente ci-dessous deux suites de dessins.
>>> > 17           \startlinecorrection[blank]
>>> > 18             \startmidaligned
>>> > 19               \startcombination[2*1]
>>> > 20                 {\startMPcode
>>> > 21                   suite{1,0};
>>> > 22                   suite(2,1);
>>> > 23 >>               \stopMPcode}{\tfxx \bf Suite 2}
>>> > 24           \stopcombination
>>> > 25             \stopmidaligned
>>> > 26           \stoplinecorrection
>>> > 27     \stoptext
>>> >
>>> > mtx-context     | fatal error: return code: 256
>>> >
>>> > TeX Output exited abnormally with code 1 at Tue Feb 11 11:45:53
>>> >
>>> > ##################################################
>>> > macro.tex
>>> > ##################################################
>>> >
>>> > \startMPcode
>>> >    def suite (expr n, t) =
>>> >    begingroup
>>> >     numeric u;
>>> >     u := 5mm;
>>> >     pickup pencircle scaled 4pt;
>>> >     for i=0 upto n:
>>> >       for j=0 upto n:
>>> >           drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
>>> >       endfor
>>> >     endfor
>>> >    endgroup
>>> >    enddef;
>>> > \stopMPcode
>>> > \starttext
>>> >   On présente ci-dessous deux suites de dessins.
>>> >        \startlinecorrection[blank]
>>> >          \startmidaligned
>>> >            \startcombination[2*1]
>>> >              {\startMPcode
>>> >                suite{1,0};
>>> >                suite(2,1);
>>> >               \stopMPcode}{\tfxx \bf Suite 2}
>>> >        \stopcombination
>>> >          \stopmidaligned
>>> >        \stoplinecorrection
>>> > \stoptext
>>> >
>>> >
>>> > 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://context.aanhet.net
>>> > archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> > wiki     : http://contextgarden.net
>>> >
>>> ___________________________________________________________________________________
>>> >
>>>
>>>
>>> --
>>>
>>> -----------------------------------------------------------------
>>>                                            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
>>>
>>> ___________________________________________________________________________________
>>>
>>
>> ___________________________________________________________________________________
>> 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
>>
>> ___________________________________________________________________________________
>>
>
> I think Hans meant you should use () and not {}.
>
> The following compiles here.
>
> Hope it helps!
>
> /Mikael
>
> \startMPcode
>   def suite (expr n, t) =
>   begingroup
>    numeric u;
>    u := 5mm;
>    pickup pencircle scaled 4pt;
>    for i=0 upto n:
>      for j=0 upto n:
>          drawdot (i*u,j*u) shifted(t*u,0) withcolor darkred;
>      endfor
>    endfor
>   endgroup
>   enddef;
> \stopMPcode
> \starttext
>  On présente ci-dessous deux suites de dessins.
>       \startlinecorrection[blank]
>         \startmidaligned
>           \startcombination[2*1]
>             {\startMPcode
>               suite(1,0);
>               suite(2,1);
>              \stopMPcode}{\tfxx \bf Suite 2}
>       \stopcombination
>         \stopmidaligned
>       \stoplinecorrection
> \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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 11446 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] 5+ messages in thread

end of thread, other threads:[~2020-02-11 20:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 10:50 macro that does not work (Metapost) Fabrice Couvreur
2020-02-11 12:08 ` Hans Hagen
2020-02-11 12:19   ` Fabrice Couvreur
2020-02-11 13:00     ` Mikael P. Sundqvist
2020-02-11 20:40       ` Fabrice Couvreur

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