From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 5067E23D5A for ; Thu, 15 Feb 2024 01:05:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 8532B484167 for ; Thu, 15 Feb 2024 01:04:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=labonneheure.ch 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 iaeinTVhoJW7 for ; Thu, 15 Feb 2024 01:04:12 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 009674840D2 for ; Thu, 15 Feb 2024 01:02:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 93ECD483FBC for ; Thu, 15 Feb 2024 01:01:18 +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 u5itaAYAwQ3X for ; Thu, 15 Feb 2024 01:01:18 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=45.13.66.34; helo=outbound00.knthost.com; envelope-from=emanuel@labonneheure.ch; receiver= X-Greylist: delayed 389 seconds by postgrey-1.36 at cgl.ntg.nl; Thu, 15 Feb 2024 01:01:17 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)) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id C13B8483FBA for ; Thu, 15 Feb 2024 01:01:17 +0100 (CET) Date: Thu, 15 Feb 2024 00:54:40 +0100 DKIM-Filter: OpenDKIM Filter v2.10.3 outbound00.knthost.com E1B3F3B33D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=labonneheure.ch; s=default; t=1707954883; bh=EuJ6kQt45crsrFLxYoiS8bj4xe+LVR6/Y0UUQ0CPuvM=; h=Date:From:To:Subject; b=1CJBbBGNAGUOpn5CLMSVhE+oimpGS8mKyU45uYrg6Szdk9rpsEfr1XWZHYQBf7R9+ +/SZCxw9qbRGXkzyxpaoz+tXTEPZQ+v3tLZSzf0YuBgRWF+lplReT5PqdmIEwCIm6a AV/iEw/hbugbCPTimJ5Mlb1wnQtoEehMM1/sLfTnBVCAiQirU5i0Bz27dyBU4hLmuP 0sbXdKUCpvDoHfu78rlYG/WW57so7zDrEsnkA25I6O5w0WEJkqaTUXFixeCj0x4lZV 7n9m+qT8yIy8BdjlNkBw4Ze/Rh+egDoCx0HCXJjiMcrrNQl9smaOnkoI8xGSBAGJRb hHYGJ1OBREhpg== To: "=?utf-8?Q?ntg-context=40ntg.nl?=" Message-ID: X-Mailer: Mailspring MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="65cd52c0_327b23c6_65cd" Message-ID-Hash: 52RFRECSMYI5TTFMEDVZ3BBWFUXC364D X-Message-ID-Hash: 52RFRECSMYI5TTFMEDVZ3BBWFUXC364D 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] Working with layer sets with Metapost 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 --65cd52c0_327b23c6_65cd Content-Type: multipart/alternative; boundary="65cd52c0_6b8b4567_65cd" --65cd52c0_6b8b4567_65cd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear list, the attached .tex file is the minimal working example we discussed today in the online meeting. I realized that the approach of looping through k of p[k] is not fitting my needs, because it's not flexible enough. I need another approach, one which works with layer sets. I would stop using p as an array, because with the layer sets approach we don't have a fixed order of the layers. So the definition of the layers would be something like picture layerA; layerA:=image( label("Word 1", z1); ); picture layerW; layerW:=image( label("Mot 2", z2); ); picture layerM; layerM:=image( label("Parola 3", z3); ); picture layerC; layerC:=image( label("Wort 4", z3+z1); ); picture layerY; layerY:=image( label("Nummer 5", z2+z3); ); picture layerU; layerU:=image( label("number 6", z2+z1); ); After that, I would define layer sets and layer subsets. This will be done manually for each layer set and each layer subset. I don't know the proper syntax to do that. Let's assume we could use a variable type called "myset". myset layersubsetGamma; layersubsetGamma:={layerU,layerM}; In my logic, the layers will be drawn in the order of their appearance within the {}. In the example, drawn content of layerM might cover drawn content of layerU. Contrary to a layer subset, each layer set will result in a PDF page, and thus the layer sets are related to each other by an inner order. That's why I would use an array variable here with []. I don't know how to append a set. In the following example, I assumed there would be a function myappend(, ) myset layerset[]; layerset1 := {layerW,layerA}; layerset2 := myappend{layerset1, layerY}; layerset3 := myappend{layerset2, layersubsetGamma}; layerset4 := myappend{layerset2, layerU}; layerset5 := myappend{layerset4, layersubsetGamma}; Finally, I would need each layerset[k] typeset on its own pdf page. And of course on each page k, only the layers which appear in the definition of the layerset[k] should be drawn on top of each other in the order as they appear in that definition. I'm very curious to hear your suggestions. Thanks Emanuel --65cd52c0_6b8b4567_65cd Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Dear list,

the attached .tex file is the minimal work= ing example we discussed today in the online meeting.

I re= alized that the approach of looping through k of p=5Bk=5D is not fitting = my needs, because it's not flexible enough.

I need another= approach, one which works with layer sets.

I would stop u= sing p as an array, because with the layer sets approach we don't have a = fixed order of the layers.

So the definition of the layers= would be something like

    picture layerA;=
    layerA:=3Dimage(
  &nb= sp; label(=22Word 1=22, z1);
    );

    picture layerW;
    layerW= :=3Dimage(
    label(=22Mot 2=22, z2);
    );
    picture layerM; <= /div>
    layerM:=3Dimage(
   = ; label(=22Parola 3=22, z3);
    );
&n= bsp;  
    picture layerC;
    layerC:=3Dimage(
    label(=22= Wort 4=22, z3+z1);
    );

 &n= bsp;  picture layerY;
    layerY:=3Dimage(=
    label(=22Nummer 5=22, z2+z3);
&nb= sp;   );
   
  &n= bsp; picture layerU;
    layerU:=3Dimage(
=
    label(=22number 6=22, z2+z1);
 &nb= sp;  );

After that, I would define layer sets and laye= r subsets. This will be done manually for each layer set and each layer s= ubset.
I don't know the proper syntax to do that. Let's assume = we could use a variable type called =22myset=22.

myset laye= rsubsetGamma;
layersubsetGamma:=3D=7BlayerU,laye= rM=7D;

In my logic, the layers will be drawn in the order o= f their appearance within the =7B=7D. In the example, drawn content of la= yerM might cover drawn content of layerU.

Contrary to a lay= er subset, each layer set will result in a PD=46 page, and thus the layer= sets are related to each other by an inner order. That's why I would use= an array variable here with =5B=5D.

I don't know how to ap= pend a set. In the following example, I assumed there would be a function= myappend(<initial set>, <the things what the initial set should= be appended with>)

myset layerset=5B=5D;
laye= rset1 :=3D =7BlayerW,lay= erA=7D;
layerset2 :=3D myappend=7Blayerset1, layerY=7D;
layerset3 :=3D myappend=7Blayerset2, layersub= setGamma=7D;
layerset4 :=3D=  myappend=7Blayerset2, layerU=7D;
layerset5 :=3D myappend=7Blayerset4, laye= rsubsetGamma=7D;

=46inally, I would need each layerset=5Bk=5D= typeset on its own pdf page. And of course on each page k, only the laye= rs which appear in the definition of the layerset=5Bk=5D should be drawn = on top of each other in the order as they appear in that definition.
I'm very curious to hear your suggestions.

Thank= s
Emanuel

--65cd52c0_6b8b4567_65cd-- --65cd52c0_327b23c6_65cd Content-Type: application/x-tex Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="=?utf-8?Q?multipage=5Fmetapost=5Fmwe-very=5Fsimple.tex?=" XHN0YXJ0dXNlTVBncmFwaGlje2Jhc2V9CiAgICBwaWN0dXJlIHBbXTsKICAgIHBhdGggVGhlRnJh bWUgOwogICAgVGhlRnJhbWUgOj0gZnVsbHNxdWFyZSBzY2FsZWQgNWluIDsKICAgIAogICAgJWxl dCdzIGRlZmluZSB0aGUgY29tbW9ubHkgdXNlZCBnZW9tZXRyeSBlbGVtZW50cwogICAgCiAgICB6 MSA9ICg2MCw0MCk7CiAgICB6MiA9ICg0MCw5MCk7CiAgICB6MyA9ICgxMCw3MCk7CiAgICAKICAg ICVsZXQncyBkZWZpbmUgc29tZSBsYXllcnMgd2l0aCBkcmF3biBjb250ZW50CgogICAgcDE6PWlt YWdlKAogICAgbGFiZWwoIldvcmQgMSIsIHoxKTsKICAgICk7CgogICAgcDI6PWltYWdlKAogICAg bGFiZWwoIk1vdCAyIiwgejIpOwogICAgKTsKCiAgICBwMzo9aW1hZ2UoCiAgICBsYWJlbCgiUGFy b2xhIDMiLCB6Myk7CiAgICApOwogICAgCiAgICBwNDo9aW1hZ2UoCiAgICBsYWJlbCgiV29ydCA0 IiwgejMrejEpOwogICAgKTsKCiAgICBwNTo9aW1hZ2UoCiAgICBsYWJlbCgiTnVtbWVyIDUiLCB6 Mit6Myk7CiAgICApOwogICAgCiAgICBwNjo9aW1hZ2UoCiAgICBsYWJlbCgibnVtYmVyIDYiLCB6 Mit6MSk7CiAgICApOwoKICAgIFxzdG9wdXNlTVBncmFwaGljCgogICAgXHN0YXJ0dGV4dAoKICAg IFxkb3JlY3Vyc2V7Nn17ICUgRnJhbWUKCVxpZm51bSAKICAgICAgICAgICAgXHJlY3Vyc2VsZXZl bCA9IDMgJXRoaXMgZGVmaW5lcyB0aGUgcGFnZSB3aGljaCB3aWxsIGJlIHNraXBwZWQuIFRoaXMg c29sdXRpb24gYWxsb3dzIG9ubHkgb25lIHBhZ2UgdG8gYmUgc2tpcHBlZC4gCglcZWxzZQogICAg ICAgICAgICBcc3RhcnRNUHBhZ2VbcGFnZXN0YXRlPXN0YXJ0XQogICAgICAgIAogICAgICAgICAg ICBcaW5jbHVkZU1QZ3JhcGhpY3tiYXNlfQogICAgICAgIAogICAgICAgICAgICBjdXJyZW50aW1l IDo9ICMxIDsKICAgICAgICAgICAgJSBKdXN0IGZvciBsZWFybmluZyA6CiAgICAgICAgICAgIGRy YXcgVGhlRnJhbWUgd2l0aHBlbiBwZW5jaXJjbGUgc2NhbGVkIC4xaW4gd2l0aGNvbG9yIG1hZ2Vu dGEgOwogICAgICAgICAgICBkcmF3IHRleHRleHQoIlQ9IiZkZWNpbWFsKGN1cnJlbnRpbWUpKSBz aGlmdGVkKDAsMmluKQogICAgICAgICAgICB3aXRoY29sb3IgbWFnZW50YSA7CiAgICAgICAgICAg IGJvb2xlYW4gYltdOyAKICAgICAgICAgICAgJWluIHRoZSBmb2xsb3dpbmcgbGluZXMgYltdIDo9 ICwgd2UgZGVmaW5lIHRoZSBpbWFnZXMgd2hpY2ggc2hvdWxkIG5vdCBiZSBhZGRlZCB0byBjdXJy ZW50cGljdHVyZToKICAgICAgICAgICAgYlszXSA6PSB0cnVlOyAKICAgICAgICAgICAgYls1XSA6 PSB0cnVlOwogICAgICAgICAgICBmb3Igaz0xIHVwdG8gY3VycmVudGltZTogCiAgICAgICAgICAg IGlmIGtub3duIGJba10gOgogICAgICAgICAgICBlbHNlIDoKICAgICAgICAgICAgYWRkdG8gY3Vy cmVudHBpY3R1cmUgYWxzbyBwW2tdOyAKICAgICAgICAgICAgZmkKICAgICAgICAgICAgZW5kZm9y CiAgICAgICAgICAgIHNldGJvdW5kcyBjdXJyZW50cGljdHVyZSB0byBUaGVGcmFtZSA7CiAgICAg ICAgCiAgICAgICAgICAgIGRlc2lyZWRmb3JtYXQgOj0gMTA4MDslIEluIHBpeGVscyAod2lsbCBi ZSBjb252ZXJ0ZWQgYnkgZGVmYXVsdCBhdCA3MmRwaSkKICAgICAgICAgICAgY3VycmVudHBpY3R1 cmUgOj0gY3VycmVudHBpY3R1cmUgeHlzaXplZCAoZGVzaXJlZGZvcm1hdCAsZGVzaXJlZGZvcm1h dCApOwogICAgICAgIAogICAgICAgICAgICBcc3RvcE1QcGFnZQogICAgICAgIFxmaQogICAgfQoK ICAgIFxzdG9wdGV4dAo= --65cd52c0_327b23c6_65cd 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 ___________________________________________________________________________________ --65cd52c0_327b23c6_65cd--