From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18520 invoked from network); 2 Dec 2023 17:11:28 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 2 Dec 2023 17:11:28 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 82DA8483477 for ; Sat, 2 Dec 2023 18:10:55 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KtuyRl4SckIK for ; Sat, 2 Dec 2023 18:10:54 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 9E7C44838EA for ; Sat, 2 Dec 2023 18:09:15 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 54EB2483C3D for ; Sat, 2 Dec 2023 18:08:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VUROFMM8eQij for ; Sat, 2 Dec 2023 18:08:51 +0100 (CET) Received: from outbound00.knthost.com (outbound00.knthost.com [45.13.66.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id C2EFF483C3B for ; Sat, 2 Dec 2023 18:08:50 +0100 (CET) Date: Sat, 2 Dec 2023 18:08:46 +0100 DKIM-Filter: OpenDKIM Filter v2.10.3 outbound00.knthost.com DEB56F12F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=labonneheure.ch; s=default; t=1701536869; bh=V4GEZk89j1qmDrJRQZCeCIibknF1jiGCnjs2OdrxfKM=; h=Date:From:To:In-Reply-To:References:Subject; b=5TN2dYNbxivPY4X+MqsgVxr+C4RL9/uwja6HwtXab4s+ShtQ+bsLboqMaIi/TsiVx hVD3A//QA6byku0gZWcV5AP+jOxpHPP2Zgv8EJF4ryc4FwTRb5jtHkFksj3fnLb52s zT8vSY7iZy7HuH2TOP7kcpwE5dIuQnPtSMHIuT+tUklWX6tROnbfsjB7F9IufYtzkW QwfoV81XglTjM95J1hoi72bXHz3gIAVjwoSJlXhxzpYhlpiyZF4/SP0wrjd/V9EgV8 zeXRqblpi5DfnV+P3MmMyxAS2dLONPXLt9rALqRiuXF2P18dkpiYZv6kBp+NmMjAVN bEVR62qlTWTLA== To: mailing list for ConTeXt users Message-ID: In-Reply-To: References: X-Mailer: Mailspring MIME-Version: 1.0 Message-ID-Hash: ROKDKP2S34LHWAC5NAJXH2PAZTAHDN75 X-Message-ID-Hash: ROKDKP2S34LHWAC5NAJXH2PAZTAHDN75 X-MailFrom: emanuel@labonneheure.ch X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: multipage metapost output from ConTeXt List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Emanuel Han via ntg-context Cc: Emanuel Han Content-Type: multipart/mixed; boundary="===============5334188403614401444==" --===============5334188403614401444== Content-Type: multipart/alternative; boundary="656b649e_327b23c6_1677" --656b649e_327b23c6_1677 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Mikael, here's a very simple mwe for the label(textext()) issue. On page 1, the t= ext =22Word 1=22 should be drawn in position z1. On page 2, the same text= in the same position should be visible, and the text =22Mot 2=22 in posi= tion p2 should be added. And so on. =5CstartMPinclusions picture p=5B=5D; path The=46rame ; The=46rame :=3D fullsquare scaled 5in ; z1 =3D (60,40); z2 =3D (40,90); z3 =3D (10,70); p1:=3Dimage( label(textext(=22Word 1=22), z1); ); p2:=3Dimage( label(textext(=22Mot 2=22), z2); ); p3:=3Dimage( label(textext(=22Parola 3=22), z3); ); =5CstopMPinclusions =5Cstarttext =5Cdorecurse=7B3=7D=7B % =46rame =5CstartMPpage=5Bpagestate=3Dstart=5D currentime :=3D =231 ; % Just for learning : draw The=46rame withpen pencircle scaled .1in withcolor magenta ; draw textext(=22T=3D=22&decimal(currentime)) scaled 2 shifted(0,2in) with= color magenta ; for k=3D1 upto currentime: draw p=5Bk=5D; endfor setbounds currentpicture to The=46rame ; desiredformat :=3D 1080;% In pixels (will be converted by default at 72dp= i) currentpicture :=3D currentpicture xysized (desiredformat ,desiredformat = ); =5CstopMPpage =7D =5Cstoptext On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > Hi Emanuel, > > I am not sure I understand your question, and since you use fonts that > i do not have, I cannot test your example as is. But, maybe, if you > want to redraw a picture, you can do > > addto currentpicture also p1; > where you want it. > /Mikael > PS =46or the text thing, I did not get it. Could one have a =5Fvery > simple=5F example showing only that problem and no other problem=3F > > On Sat, Dec 2, 2023 at 12:58=E2=80=AFPM fv leung = wrote: > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in= black. > > The other issue, I can't help. > > > > Emanuel Han via ntg-context =E6=96=BC 2023=E5=B9= =B412=E6=9C=882=E6=97=A5 =E9=80=B1=E5=85=AD =E4=B8=8B=E5=8D=887:23=E5=AF=AB= =E9=81=93=EF=BC=9A > >> > >> So is there a way to circumvent these issues=3F Or an explanation fo= r this behavior, so that I can try to find a solution by myself=3F > >> > >> Thanks > >> Emanuel > >> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context wrote: > >> > >> Dear Aditya and =46abrice, > >> thanks for your responses. > >> > >> I included some of =46abrice's code into mine for testing purpose, a= nd indeed the multipage works now. > >> What is bizarre is that issues appear now that didn't appear before:= > >> > >> Path A is drawn with color red on page 1, and in color black on all = following pages, while it should stay red. > >> textext(, ) is overwriting with =22T=3D=22&decima= l(currentime) which has been used previously in textext() before the for = k=3D1 endfor loop. This overwriting happens only for the first textext() = which occurs inside the for k=3D1 endfor loop. All other textext() inside= the for k=3D1 endfor loop are not drawn at all. If the line =C2=AB draw = textext(=22T=3D=22&decimal(currentime)) scaled 2 shifted(0,2in) withcolor= magenta ; =C2=BB is commented out, the first textext() inside the for k=3D= 1 endfor loop is not drawn neither. It must be an issue with textext(), b= ecause when I replace textext() by lmt=5Foutline=5B=5D, the text is drawn= . > >> > >> Adjusted mwe: > >> > >> =5Cenableregime=5Butf=5D % enable unicoded input > >> > >> =5Cdefinefontfamily =5BRoman=46ont=5D =5Brm=5D =5Bcalluna=5D > >> > >> =5Cdefinefontfamily =5BKorean=46ont=5D =5Brm=5D =5Bapplemyungjo=5D > >> > >> =5Cdefinefontfamily =5BJapanese=46ont=5D =5Brm=5D =5Bhannotatesc=5D > >> > >> =5Cdefinefontfeature > >> =5Bfea=5D > >> =5Bmode=3Dnode,language=3Ddflt,script=3Darab, > >> init=3Dyes, > >> medi=3Dyes, > >> fina=3Dyes, > >> isol=3Dyes, > >> calt=3Dyes, > >> rlig=3Dyes, > >> tlig=3Dyes, > >> trep=3Dyes, > >> curs=3Dyes, > >> kern=3Dyes, > >> mark=3Dyes > >> =5D > >> > >> =5Cstarttypescript =5Bserif=5D =5Bnotonaskharabic=5D > >> =5Cdefinefontsynonym =5Bnotonaskharabic-Light=5D =5Bname:notonaskhar= abic=5D =5Bfeatures=3Dfea=5D > >> =5Cdefinefontsynonym =5Bnotonaskharabic-Bold=5D =5Bname:notonaskhara= bic=5D =5Bfeatures=3Dfea=5D > >> =5Cdefinefontsynonym =5Bnotonaskharabic-Italic=5D =5Bname:notonaskha= rabic=5D =5Bfeatures=3Dfea=5D > >> =5Cdefinefontsynonym =5Bnotonaskharabic-Bold-Italic=5D =5Bname:noton= askharabic=5D =5Bfeatures=3Dfea=5D > >> =5Cstoptypescript > >> > >> =5Cstarttypescript =5Bserif=5D =5Bnotonaskharabic=5D > >> =5Cusetypescript=5Bserif=5D=5Bfallback=5D > >> =5Cdefinefontsynonym =5BSerif=5D =5Bnotonaskharabic-Light=5D =5Bfeat= ures=3Dfea=5D > >> =5Cdefinefontsynonym =5BSerifItalic=5D =5Bnotonaskharabic-Italic=5D = =5Bfeatures=3Dfea=5D > >> =5Cdefinefontsynonym =5BSerifBold=5D =5Bnotonaskharabic-Bold=5D =5Bf= eatures=3Dfea=5D > >> =5Cdefinefontsynonym =5BSerifBoldItalic=5D =5Bnotonaskharabic-Bold-I= talic=5D =5Bfeatures=3Dfea=5D > >> =5Cstoptypescript > >> > >> =5Cstarttypescript =5Bnotonaskharabic=5D > >> =5Cdefinetypeface =5Bnotonaskharabic=5D =5Brm=5D =5Bserif=5D =5Bnoto= naskharabic=5D =5Bdefault=5D > >> =5Cstoptypescript > >> > >> =5Cusetypescript=5Bnotonaskharabic=5D > >> > >> =5Csetupbodyfont =5BRoman=46ont=5D > >> > >> =5Cusecolors=5Bcrayola=5D > >> > >> =5CstartMPinclusions > >> > >> picture p=5B=5D; > >> path The=46rame ; > >> The=46rame :=3D fullsquare scaled 5in ; > >> > >> z0 =3D (0,0); > >> z1 =3D (60,40); > >> z2 =3D (40,90); > >> z3 =3D (10,70); > >> z4 =3D (30,50); > >> z5 =3D (90,70); > >> z6 =3D (-10,70); > >> > >> path A; A =3D z0..z1..z2..z3..z4 ; > >> pair AStartPoint; AStartPoint =3D point 0 of A; > >> pair AEndPoint; AEndPoint =3D point 4 of A; > >> path B; B =3D z5..z6; > >> pair BStartPoint; BStartPoint =3D point 0 of B; > >> pair BEndPoint; BEndPoint =3D point 1 of B; > >> path C; C =3D AStartPoint..AEndPoint; > >> > >> p1:=3Dimage( > >> draw A withcolor red; > >> ); > >> > >> p2:=3Dimage(draw A; label(lmt=5Foutline =5B > >> text =3D =22=5CJapanese=46ont =E6=97=A5=E6=9C=AC=E8=AA=9E=22 > >> =5D, AEndPoint);); > >> > >> p3:=3Dimage( > >> label(textext(=22=5Cnotonaskharabic =5Ctextdir TRT =D8=AF=D8=A7=D9=86= =DA=AF=22) scaled 1.2, BStartPoint); > >> ); > >> > >> p4:=3Dimage(draw A; label(lmt=5Foutline =5B > >> text =3D =22=5CKorean=46ont =ED=95=9C=EA=B5=AD=EC=96=B4=22 > >> =5D, AStartPoint);); > >> > >> p5:=3Dimage( > >> label(textext(=22b=C4=81ng=22), BEndPoint); > >> draw C withcolor green; > >> ); > >> > >> p6:=3Dimage( > >> draw B withcolor blue; > >> ); > >> =5CstopMPinclusions > >> > >> =5Cstarttext > >> > >> =5Cdorecurse=7B6=7D=7B % =46rame > >> =5CsetupMPpage=5Bbackground=3Dcolor, backgroundcolor=3DSpringGreen=5D= > >> =5CstartMPpage=5Bpagestate=3Dstart=5D > >> currentime :=3D =231 ; > >> % Just for learning : > >> draw The=46rame withpen pencircle scaled .1in withcolor magenta ; > >> draw textext(=22T=3D=22&decimal(currentime)) scaled 2 shifted(0,2in)= withcolor magenta ; > >> for k=3D1 upto currentime: draw p=5Bk=5D; endfor > >> setbounds currentpicture to The=46rame ; > >> > >> desiredformat :=3D 1080;% In pixels (will be converted by default at= 72dpi) > >> currentpicture :=3D currentpicture xysized (desiredformat ,desiredfo= rmat ); > >> > >> =5CstopMPpage > >> =7D > >> > >> =5Cstoptext > >> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan w= rote: > >> > >> On Mon, 27 Nov 2023, =46abrice L wrote: > >> > >> > Hi, > >> > > >> > It is fun fact very easy to do. You just use =5CstartMPpage (=E2=80= =A6) =5CstopMPpage multiple times. Here is an example which build an anim= ation of a particle moving according to a Brownian motion. > >> > >> A very similar option is to pass a variable to a metapost drawing. T= his is what I use: > >> > >> https://adityam.github.io/context-blog/post/metapost-animation/ > >> > >> It only works when viewed in acrobat, you can just comment out the a= nimation part and wrap it in =5CstartTEXpage .. =5CstopTEXpage to get mul= ti-page animation. > >> > >> Aditya=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > >> If your question is of interest to others as well, please add an ent= ry to the Wiki=21 > >> > >> maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/li= sts/ntg-context.ntg.nl > >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mi= rror) > >> archive : https://github.com/contextgarden/context > >> wiki : https://wiki.contextgarden.net > >> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > >> > >> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > >> If your question is of interest to others as well, please add an ent= ry to the Wiki=21 > >> > >> maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/li= sts/ntg-context.ntg.nl > >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mi= rror) > >> archive : https://github.com/contextgarden/context > >> wiki : https://wiki.contextgarden.net > >> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > >> > >> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > >> If your question is of interest to others as well, please add an ent= ry to the Wiki=21 > >> > >> maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/li= sts/ntg-context.ntg.nl > >> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mi= rror) > >> archive : https://github.com/contextgarden/context > >> wiki : https://wiki.contextgarden.net > >> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > > > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > > If your question is of interest to others as well, please add an entr= y to the Wiki=21 > > > > maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/lis= ts/ntg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mir= ror) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F > If your question is of interest to others as well, please add an entry = to the Wiki=21 > > maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/lists= /ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirro= r) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F > --656b649e_327b23c6_1677 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi Mikael,

here's a very simple mwe for the label(tex= text()) issue. On page 1, the text =22Word 1=22 should be drawn in positi= on z1. On page 2, the same text in the same position should be visible, a= nd the text =22Mot 2=22 in position p2 should be added. And so on.
=
=5CstartMPinclusions

picture p=5B=5D;
&n= bsp;path The=46rame ;
 The=46rame :=3D fullsquare scaled 5= in ;
 
 z1 =3D (60,40);
 z2= =3D (40,90); 
 z3 =3D (10,70);

p1:=3D= image(
    label(textext(=22Word 1=22), z1);
);

p2:=3Dimage(
    label(t= extext(=22Mot 2=22), z2);
);

p3:=3Dimage(
    label(textext(=22Parola 3=22), z3);
);
=5CstopMPinclusions

=5Cstarttext

= =5Cdorecurse=7B3=7D=7B % =46rame
=5CstartMPpage=5Bpagestate=3Ds= tart=5D  
 currentime :=3D =231 ;
&nb= sp;% Just for learning :
 draw The=46rame withpen pencircl= e scaled .1in withcolor magenta ;
 draw textext(=22T=3D=22= &decimal(currentime)) scaled 2 shifted(0,2in) withcolor magenta ;
 for k=3D1 upto currentime: draw p=5Bk=5D; endfor
&= nbsp;setbounds currentpicture to The=46rame ;

 desired= format :=3D 1080;% In pixels (will be converted by default at 72dpi)
 currentpicture :=3D currentpicture xysized (desiredformat ,de= siredformat );
 
=5CstopMPpage
=7D
=5Cstoptext

On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist <mickep=40gmail.c= om> wrote:
Hi Emanuel,

I am n= ot sure I understand your question, and since you use fonts that
i do not have, I cannot test your example as is. But, maybe, if you
want to redraw a picture, you can do

addto currentpi= cture also p1;

where you want it.

/Mikael
PS =46or the text thing, I did not get it. Could one have a =5F= very
simple=5F example showing only that problem and no other p= roblem=3F

On Sat, Dec 2, 2023 at 12:58=E2=80=AFPM fv leung = <fvleung=40gmail.com> wrote:
>
> You didn= 't specify the color of path A in p2 and p4. So it's drawn in black.
> The other issue, I can't help.
>
> E= manuel Han via ntg-context <ntg-context=40ntg.nl> =E6=96=BC 2023=E5= =B9=B412=E6=9C=882=E6=97=A5 =E9=80=B1=E5=85=AD =E4=B8=8B=E5=8D=887:23=E5=AF= =AB=E9=81=93=EF=BC=9A
>>
>> So is there a= way to circumvent these issues=3F Or an explanation for this behavior, s= o that I can try to find a solution by myself=3F
>>
=
>> Thanks
>> Emanuel
>>
<= div>>> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context &l= t;ntg-context=40ntg.nl> wrote:
>>
>> D= ear Aditya and =46abrice,
>> thanks for your responses.
>>
>> I included some of =46abrice's code = into mine for testing purpose, and indeed the multipage works now.
<= div>>> What is bizarre is that issues appear now that didn't appear= before:
>>
>> Path A is drawn with color= red on page 1, and in color black on all following pages, while it shoul= d stay red.
>> textext(<text>, <pair>) is ove= rwriting <text> with =22T=3D=22&decimal(currentime) which has b= een used previously in textext() before the for k=3D1 endfor loop. This o= verwriting happens only for the first textext() which occurs inside the f= or k=3D1 endfor loop. All other textext() inside the for k=3D1 endfor loo= p are not drawn at all. If the line =C2=AB draw textext(=22T=3D=22&de= cimal(currentime)) scaled 2 shifted(0,2in) withcolor magenta ; =C2=BB is = commented out, the first textext() inside the for k=3D1 endfor loop is no= t drawn neither. It must be an issue with textext(), because when I repla= ce textext() by lmt=5Foutline=5B=5D, the text is drawn.
>>= ;
>> Adjusted mwe:
>>
>> = =5Cenableregime=5Butf=5D % enable unicoded input
>>
=
>> =5Cdefinefontfamily =5BRoman=46ont=5D =5Brm=5D =5Bcalluna=5D=
>>
>> =5Cdefinefontfamily =5BKorean=46on= t=5D =5Brm=5D =5Bapplemyungjo=5D
>>
>> =5C= definefontfamily =5BJapanese=46ont=5D =5Brm=5D =5Bhannotatesc=5D
>>
>> =5Cdefinefontfeature
>> =5B= fea=5D
>> =5Bmode=3Dnode,language=3Ddflt,script=3Darab,
>> init=3Dyes,
>> medi=3Dyes,
&g= t;> fina=3Dyes,
>> isol=3Dyes,
>> calt= =3Dyes,
>> rlig=3Dyes,
>> tlig=3Dyes,
>> trep=3Dyes,
>> curs=3Dyes,
>= > kern=3Dyes,
>> mark=3Dyes
>> =5D
>>
>> =5Cstarttypescript =5Bserif=5D =5Bnoto= naskharabic=5D
>> =5Cdefinefontsynonym =5Bnotonaskharabic= -Light=5D =5Bname:notonaskharabic=5D =5Bfeatures=3Dfea=5D
>&= gt; =5Cdefinefontsynonym =5Bnotonaskharabic-Bold=5D =5Bname:notonaskharab= ic=5D =5Bfeatures=3Dfea=5D
>> =5Cdefinefontsynonym =5Bnot= onaskharabic-Italic=5D =5Bname:notonaskharabic=5D =5Bfeatures=3Dfea=5D
>> =5Cdefinefontsynonym =5Bnotonaskharabic-Bold-Italic=5D =5B= name:notonaskharabic=5D =5Bfeatures=3Dfea=5D
>> =5Cstopty= pescript
>>
>> =5Cstarttypescript =5Bseri= f=5D =5Bnotonaskharabic=5D
>> =5Cusetypescript=5Bserif=5D= =5Bfallback=5D
>> =5Cdefinefontsynonym =5BSerif=5D =5Bnot= onaskharabic-Light=5D =5Bfeatures=3Dfea=5D
>> =5Cdefinefo= ntsynonym =5BSerifItalic=5D =5Bnotonaskharabic-Italic=5D =5Bfeatures=3Dfe= a=5D
>> =5Cdefinefontsynonym =5BSerifBold=5D =5Bnotonaskh= arabic-Bold=5D =5Bfeatures=3Dfea=5D
>> =5Cdefinefontsynon= ym =5BSerifBoldItalic=5D =5Bnotonaskharabic-Bold-Italic=5D =5Bfeatures=3D= fea=5D
>> =5Cstoptypescript
>>
= >> =5Cstarttypescript =5Bnotonaskharabic=5D
>> =5Cd= efinetypeface =5Bnotonaskharabic=5D =5Brm=5D =5Bserif=5D =5Bnotonaskharab= ic=5D =5Bdefault=5D
>> =5Cstoptypescript
>&g= t;
>> =5Cusetypescript=5Bnotonaskharabic=5D
>= ;>
>> =5Csetupbodyfont =5BRoman=46ont=5D
>= ;>
>> =5Cusecolors=5Bcrayola=5D
>>
>> =5CstartMPinclusions
>>
>>= ; picture p=5B=5D;
>> path The=46rame ;
>>= ; The=46rame :=3D fullsquare scaled 5in ;
>>
&g= t;> z0 =3D (0,0);
>> z1 =3D (60,40);
>>= ; z2 =3D (40,90);
>> z3 =3D (10,70);
>> z= 4 =3D (30,50);
>> z5 =3D (90,70);
>> z6 =3D= (-10,70);
>>
>> path A; A =3D z0..z1..z2= ..z3..z4 ;
>> pair AStartPoint; AStartPoint =3D point 0 o= f A;
>> pair AEndPoint; AEndPoint =3D point 4 of A;
=
>> path B; B =3D z5..z6;
>> pair BStartPoint; = BStartPoint =3D point 0 of B;
>> pair BEndPoint; BEndPoin= t =3D point 1 of B;
>> path C; C =3D AStartPoint..AEndPoi= nt;
>>
>> p1:=3Dimage(
>>= draw A withcolor red;
>> );
>>
>> p2:=3Dimage(draw A; label(lmt=5Foutline =5B
>> = text =3D =22=5CJapanese=46ont =E6=97=A5=E6=9C=AC=E8=AA=9E=22
&g= t;> =5D, AEndPoint););
>>
>> p3:=3Dima= ge(
>> label(textext(=22=5Cnotonaskharabic =5Ctextdir TRT= =D8=AF=D8=A7=D9=86=DA=AF=22) scaled 1.2, BStartPoint);
>>= ; );
>>
>> p4:=3Dimage(draw A; label(lmt=5F= outline =5B
>> text =3D =22=5CKorean=46ont =ED=95=9C=EA=B5= =AD=EC=96=B4=22
>> =5D, AStartPoint););
>>= ;
>> p5:=3Dimage(
>> label(textext(=22b=C4= =81ng=22), BEndPoint);
>> draw C withcolor green;
>> );
>>
>> p6:=3Dimage(
>> draw B withcolor blue;
>> );
>&g= t; =5CstopMPinclusions
>>
>> =5Cstarttext=
>>
>> =5Cdorecurse=7B6=7D=7B % =46rame
>> =5CsetupMPpage=5Bbackground=3Dcolor, backgroundcolor=3D= SpringGreen=5D
>> =5CstartMPpage=5Bpagestate=3Dstart=5D
>> currentime :=3D =231 ;
>> % Just for le= arning :
>> draw The=46rame withpen pencircle scaled .1in= withcolor magenta ;
>> draw textext(=22T=3D=22&decim= al(currentime)) scaled 2 shifted(0,2in) withcolor magenta ;
>= ;> for k=3D1 upto currentime: draw p=5Bk=5D; endfor
>>= setbounds currentpicture to The=46rame ;
>>
&g= t;> desiredformat :=3D 1080;% In pixels (will be converted by default = at 72dpi)
>> currentpicture :=3D currentpicture xysized (= desiredformat ,desiredformat );
>>
>> =5C= stopMPpage
>> =7D
>>
>> =5C= stoptext
>> On Nov. 27 2023, at 11:25 pm, Aditya Mahajan = <adityam=40umich.edu> wrote:
>>
>> = On Mon, 27 Nov 2023, =46abrice L wrote:
>>
>= > > Hi,
>> >
>> > It is fun f= act very easy to do. You just use =5CstartMPpage (=E2=80=A6) =5CstopMPpag= e multiple times. Here is an example which build an animation of a partic= le moving according to a Brownian motion.
>>
&g= t;> A very similar option is to pass a variable to a metapost drawing.= This is what I use:
>>
>> https://aditya= m.github.io/context-blog/post/metapost-animation/
>>
>> It only works when viewed in acrobat, you can just comment= out the animation part and wrap it in =5CstartTEXpage .. =5CstopTEXpage = to get multi-page animation.
>>
>> Aditya= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F
>> If your question is of intere= st to others as well, please add an entry to the Wiki=21
>&g= t;
>> maillist : ntg-context=40ntg.nl / https://mailman.n= tg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage : http= s://www.pragma-ade.nl / https://context.aanhet.net (mirror)
>= ;> archive : https://github.com/contextgarden/context
>&g= t; wiki : https://wiki.contextgarden.net
>> =5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F
>>
>> =5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F<= /div>
>> If your question is of interest to others as well, ple= ase add an entry to the Wiki=21
>>
>> mai= llist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-= context.ntg.nl
>> webpage : https://www.pragma-ade.nl / h= ttps://context.aanhet.net (mirror)
>> archive : https://g= ithub.com/contextgarden/context
>> wiki : https://wiki.co= ntextgarden.net
>> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
&g= t;>
>> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
>> If= your question is of interest to others as well, please add an entry to t= he Wiki=21
>>
>> maillist : ntg-context=40= ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
>> webpage : https://www.pragma-ade.nl / https://context.aanhet.= net (mirror)
>> archive : https://github.com/contextgarde= n/context
>> wiki : https://wiki.contextgarden.net
<= div>>> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
>
> =5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F
> If your question is of interest to o= thers as well, please add an entry to the Wiki=21
>
> maillist : ntg-context=40ntg.nl / https://mailman.ntg.nl/mailman3/= lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.= nl / https://context.aanhet.net (mirror)
> archive : https:/= /github.com/contextgarden/context
> wiki : https://wiki.cont= extgarden.net
> =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F
If your question is of interest to others as we= ll, please add an entry to the Wiki=21

maillist : ntg-conte= xt=40ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net = (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F
--656b649e_327b23c6_1677-- --===============5334188403614401444== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============5334188403614401444==--