ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: macro that does not work (Metapost)
Date: Tue, 11 Feb 2020 13:08:37 +0100	[thread overview]
Message-ID: <d4b97814-d57d-3815-948c-9bbc4e931e69@xs4all.nl> (raw)
In-Reply-To: <CACyK-eri-B74w28H_jujYB96YWck6GYCD34E_6WPm7gEMrdcbw@mail.gmail.com>

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
___________________________________________________________________________________

  reply	other threads:[~2020-02-11 12:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 10:50 Fabrice Couvreur
2020-02-11 12:08 ` Hans Hagen [this message]
2020-02-11 12:19   ` Fabrice Couvreur
2020-02-11 13:00     ` Mikael P. Sundqvist
2020-02-11 20:40       ` Fabrice Couvreur

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=d4b97814-d57d-3815-948c-9bbc4e931e69@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --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).