From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105076 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeroen Newsgroups: gmane.comp.tex.context Subject: MetaPost with Multiple Variable Sections Date: Wed, 18 Sep 2019 07:35:55 +0000 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2395977541151805647==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="37239"; mail-complaints-to="usenet@blaine.gmane.org" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 18 09:33:53 2019 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iAUTH-0009XG-AF for gctc-ntg-context-518@m.gmane.org; Wed, 18 Sep 2019 09:33:51 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0EF6F15294F; Wed, 18 Sep 2019 09:33:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JeyQMt613nuv; Wed, 18 Sep 2019 09:33:06 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 076F6152803; Wed, 18 Sep 2019 09:33:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 141CB152803 for ; Wed, 18 Sep 2019 09:33:05 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mRLLfxMLQVWY for ; Wed, 18 Sep 2019 09:33:04 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.53; helo=mail-io1-f53.google.com; envelope-from=contextntg@gmail.com; receiver= Original-Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 4572D151F84 for ; Wed, 18 Sep 2019 09:33:04 +0200 (CEST) Original-Received: by mail-io1-f53.google.com with SMTP id a1so13870414ioc.6 for ; Wed, 18 Sep 2019 00:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=u6EKde7nE4cb3BBoA1RtgHakCwoOlkDUkmPy6fXAtgo=; b=ijsGh2PnrB3dxH4ynTuyzK2J0J/uftNtes9BOGcMTuV3pWB1fSqeU57IbEYbpZ7cTo elPcFhw17TDOKtwFmAZIzmSauMemVrTWJFBYoTYiAEP4thf9GaMtGClqvi3k5UbCd9sO 2Xi9kRw0ky3gCjd9nzqInXwHGocENa7qwIJn0V0oncBy/z1iBm6k84AmiWupalPTOU2T 3jksbJfoWd32LxjmKeHn71InuVIBLUG8DrCbBcXVosRwjnHMiTBb7U231LZOMKhuKVf5 3roLOTXDe16QEjvLpLY/3cf34ZMS9hnU3lu5MhEjRGzv3XRKhnPHr/m5ZesHZjCy1VD3 8iew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=u6EKde7nE4cb3BBoA1RtgHakCwoOlkDUkmPy6fXAtgo=; b=cJJPzxv0rTFGStGTBo1E8H+CZSDatGw6L4DTk5P2o8U4E9RWsk2f0j7ALwKJ1M1qHH Jk6EWkCVs8cJ+hLgZwFmkq8baTf9wWLQ521YsES5VR8GazGl+lcc/uLD3dpBgMq0HwHr Wsc2e1DrwMR7YRfIctaD0fMlnYDhjlnO94cfYwp7dP5ye/LcUHqfLgJv+/gG8mKlKGDo LKxsstbE6oOdbYHw6FWY8k9UgkLy+oMYpiTdp6UPcKE1TWZc44aqI7qkFMr9egPzlDnw hdhYGyyqiWijdyFlWnQX19bYvd0Ot7EDKamsK0yfw/JJ/UGxiHGEEixeSkeIWZt+gF6G 8lJg== X-Gm-Message-State: APjAAAU3+g5uSTHv8luV3d1ct2eVdUO0WPhXPCASMNZ/0zu8fXzHzf0Y ZYO7B10oCanqcGqzwH502rzk4dYmIIm4tBhOiaky96PelDdycA== X-Google-Smtp-Source: APXvYqyWK2kQ+uNK70FzYOp17vPlacFz4FP0pefRK5/Ba8VS/EETMc7XLrc7mxsnSM2s8OQuvN492wgbWEqvyvaYAlg= X-Received: by 2002:a02:1dc6:: with SMTP id 189mr3472139jaj.131.1568791982032; Wed, 18 Sep 2019 00:33:02 -0700 (PDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:105076 Archived-At: --===============2395977541151805647== Content-Type: multipart/alternative; boundary="000000000000d0c8cd0592ced813" --000000000000d0c8cd0592ced813 Content-Type: text/plain; charset="UTF-8" I have been working with MetaPost as following, which worked fine with one startMPcode section with variables, but with 2 startMPcode Metapost sections, it keeps telling me the numbers dont add up: \definefloat [floatright][figure] \setupfloat [floatright][default={right,none}] \setuplayout [backspace=20mm,width=170mm,topspace=20mm,height=250mm] \starttext \placefloatright{}{ \startMPcode pair a, b; a := (0,0); b := (50,50); draw a -- b; \stopMPcode} \placefloatright{}{ \startMPcode pair a; a := 2cm; draw fullcircle scaled (2*a); \stopMPcode} \stoptext I also have tried with the startbuffer combination as below, but this gave the same error codes. Is there any other way of working with multiple MetaPost sections with variables in a single document? \definefloat [floatright][figure] \setupfloat [floatright][default={right,none}] \setuplayout [backspace=20mm,width=170mm,topspace=20mm,height=250mm] \starttext \startbuffer \startMPcode pair a, b; a := (0,0); b := (50,50); draw a -- b; \stopMPcode \stopbuffer \floatright{}{\getbuffer} \startbuffer \startMPcode pair a; a := 2cm; draw fullcircle scaled (2*a); \stopMPcode \stopbuffer \floatright{}{\getbuffer} \stoptext --000000000000d0c8cd0592ced813 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I have been working with MetaPost as f= ollowing, which worked fine with one startMPcode section with variables, bu= t with 2 startMPcode Metapost sections, it keeps telling me the numbers don= t add up:


\definefloat=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [floatright]= [figure]
\setupfloat=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [floatright][de= fault=3D{right,none}]
\setuplayout=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [backsp= ace=3D20mm,width=3D170mm,topspace=3D20mm,height=3D250mm]

\starttext

\placefloatright{}{
\startMPcode
pair a, b;
a :=3D (0,0);
= b :=3D (50,50);
draw a -- b;
\stopMPcode}

\placefloatright{}{\startMPcode
pair a;
a :=3D 2cm;
draw fullcircle scaled (2*a);\stopMPcode}

\stoptext


I also have tried with the startbu= ffer combination as below, but this gave the same error codes. Is there any= other way of working with multiple MetaPost sections with variables in a s= ingle document?


\definefloat=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [float= right][figure]
\setupfloat=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [floatrig= ht][default=3D{right,none}]
\setuplayout=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [= backspace=3D20mm,width=3D170mm,topspace=3D20mm,height=3D250mm]

\start= text

\startbuffer
\startMPcode
pair a, b;
a :=3D (0,0);
b= :=3D (50,50);
draw a -- b;
\stopMPcode
\stopbuffer

\floatri= ght{}{\getbuffer}

\startbuffer
\startMPcode
pair a;
a :=3D 2= cm;
draw fullcircle scaled (2*a);
\stopMPcode
\stopbuffer

\f= loatright{}{\getbuffer}

\stoptext

--000000000000d0c8cd0592ced813-- --===============2395977541151805647== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============2395977541151805647==--