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.7 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30264 invoked from network); 17 Aug 2023 01:53:03 -0000 Received: from cgl.ntg.nl (5.39.185.202) by inbox.vuxu.org with ESMTPUTF8; 17 Aug 2023 01:53:03 -0000 Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 41699482AAF for ; Thu, 17 Aug 2023 03:52:15 +0200 (CEST) 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 kxFME46F5Fs2 for ; Thu, 17 Aug 2023 03:52:14 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id B0563482AE6 for ; Thu, 17 Aug 2023 03:51:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 1D2F148222D for ; Thu, 17 Aug 2023 03:50:57 +0200 (CEST) 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 Vmr1VNWE8rDj for ; Thu, 17 Aug 2023 03:50:56 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 5C536482229 for ; Thu, 17 Aug 2023 03:50:56 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4fe8c3b5ca0so11664535e87.1 for ; Wed, 16 Aug 2023 18:50:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692237055; x=1692841855; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gr4T9/dPZs8TTPFs/pXyYdFS4vBuHZ05IT95vmRnnCk=; b=qPx+a7h3mnD8yvQLfHKML1E+4KcjO+QY7Td32+lot1o/nDqPcoQkN7vCJISigDt1ip +EHAMkmTpXA1pOXnSL+w0vm4M/BvC46B7Rmk6jYGNLiRbdglVBJ2h6yTkA6S9FD5/v3l wi7siYDMo9uItpFgnej+LpL2JKKG1D+ySIt8fwFgw21f7BAOtb0GxaO1/s0sGVnQq+I+ 0PXpP62apUPoCUlyw0Fngc3lj+mfs9fQB+eRNBclcgdAwSUUnp94GnlOv3MU0NgHEfvn BInMybK1+r/MRGuXhkT1Q+IenrogSYmxSEaXo3JzLv2DSZ4xuqaBywFCzYeGjalikN5C yBpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692237055; x=1692841855; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gr4T9/dPZs8TTPFs/pXyYdFS4vBuHZ05IT95vmRnnCk=; b=JGKrccPA5cq7BePjqEujwF4VfuCAY7sQWVPnvYPaM0t7GdsFbc7SqtWSfkpyRak1cX g1iuLQfYTkE3YLyTyY8c9jlFdrlcO3Zkstey5OhP6W9ljpKK0f/TdXkmrUuXn/rNpo69 w73I0qqLHXyP1W36/H9O5gCgAuk6SPt5gTv4g0dCgrYm0XJ02N+oy8MXyNilZREO18dX QJbxdVLzlTdXGIZuwz2fxhtywLk8FTwW3TSS6/9gB/VSMGLwx2FiNtJOxPizufTKOtjx GxPjFbg9zHHB3JHx96CSPDjq1iZadRQM9bx+ZSrf1vKLeKYHwZs5iKd/WVGqzt3pptz/ Mwzw== X-Gm-Message-State: AOJu0Yx4t4xLqHoik+pcCZAXbooUJyxwMzQEDIlYbpzf/Wf7Hd2Vqekv KEOGLXNSL6lFvgYpsypZv6JwYuwtGXW+QV78Qhq0KXneiYjErQ== X-Google-Smtp-Source: AGHT+IEOmlyE5wSWoyTec13hjpQ1JSDKWR/TwQBFwAycNxNDl+5LPKgrZH27aflOrMlDF1WNfW3mnLqScAPWoUkV1KU= X-Received: by 2002:a05:6512:acc:b0:4f7:6966:36fb with SMTP id n12-20020a0565120acc00b004f7696636fbmr3317112lfu.12.1692237054910; Wed, 16 Aug 2023 18:50:54 -0700 (PDT) MIME-Version: 1.0 From: Andres Conrado Montoya Date: Wed, 16 Aug 2023 20:50:18 -0500 Message-ID: To: mailing list for ConTeXt users Message-ID-Hash: ZX56H2HMEEIS6L4M634XJRXU7GHGXJDD X-Message-ID-Hash: ZX56H2HMEEIS6L4M634XJRXU7GHGXJDD X-MailFrom: andresconrado@gmail.com 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] Experiments with \doloopoverlist List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============6325864507992300933==" --===============6325864507992300933== Content-Type: multipart/alternative; boundary="00000000000088a76b060314a4b2" --00000000000088a76b060314a4b2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello List. I've been trying to typeset a somewhat complex list of authors for several articles and a book. My proof of concept seems to work fine, however, I know I am doing weird things that I think could probably be done in a better way. I'm using datasets and a recursion, kind of hacky but I can't find a better way of handling it. Specifically I would like to know: 1. Is there a way of getting the length of a filled dataset? (how many entries it contains) 2. Is it OK to use \startuserdata \stopuserdata without its inlineuserdata? Is there an alternative that does not require inlineuserdata? %%%%%%%%%% MWE: \setupinteraction[state=3Dstart] \define[2]\imghref{\bgroup\goto{#1}[url(#2)]\egroup} \defineexternalfigure[logo][height=3D1em] \definedataset[autores] \setdataset[autores][ nombre=3D{Angie Natalia Farf=C3=A1n Acevedo}, cvlac=3D{ https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do= ?cod_rh=3D0002125949 }, orcid=3D{https://orcid.org/0009-0007-0765-4241}, gscholar=3D{ https://scholar.google.com/citations?user=3DGpYTTU0AAAAJ&hl=3Des&authuser= =3D1}, ] \setdataset[autores][ nombre=3D{Ivon Andrea Rodr=C3=ADguez Rom=C3=A1n} cvlac=3D{ https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do= ?cod_rh=3D0000027033 } orcid=3D{https://orcid.org/0009-0001-1183-6829} gscholar=3D{https://scholar.google.com/citations?user=3Diz8SQNcAAAAJ&hl= =3Des} ] \setdataset[autores][ nombre=3D{Angie Caterin Garz=C3=B3n Gonz=C3=A1lez} cvlac=3D{ https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do= ?cod_rh=3D0002128501 } orcid=3D{https://orcid.org/0009-0009-0990-6902} gscholar=3D{ https://scholar.google.com/citations?view_op=3Dlist_works&hl=3Des&user=3D5W= qcOeEAAAAJ } ] \setdataset[autores][ nombre=3D{Heidy Paola Veira Tenorio} cvlac=3D{ https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do= ?cod_rh=3D0002127550 } orcid=3D{https://orcid.org/0009-0008-4076-7317} gscholar=3D{ https://scholar.google.es/citations?view_op=3Dnew_profile&hl=3Des&authuser= =3D1} ] \setdataset[autores][ nombre=3D{Yerly Lorena Diaz Aldana} cvlac=3D{ https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do= ?cod_rh=3D0002127754 } orcid=3D{https://orcid.org/0009-0008-1720-4057} gscholar=3D{ https://scholar.google.com/citations?hl=3Des&user=3D0obyCwkAAAAJ&view_op=3D= list_works&gmla=3DAOV7GLPWRTK-xooHNe0iQ3uubfcSbG__GY_Guy35FdaqDJA3OfLLtp01-= E1kzjxUhltlsfj494MaoQFkk9U9hCFYSipoR8aX0Vu2E6sV } ] \defineuserdataalternative[idautor][renderingsetup=3Duserdata:idautor] \startsetups[userdata:idautor] \dontleavehmode \imghref {\externalfigure[cvlac.pdf][logo]} {\userdataparameter{cvlac}} \quad \imghref {\externalfigure[orcid.pdf][logo]} {\userdataparameter{orcid}} \quad \imghref {\externalfigure[gscholar.pdf][logo]} {\userdataparameter{gscholar}} \quad \userdataparameter{author}\par \stopsetups \defineuserdata[idautor][alternative=3Didautor] \startdocument % I have to manually set the length of the dataset in the loop and use recurselevel... % Maybe there is a way to use the length of the "autores" dataset? and use indexes? \dorecurse{5}{ \startuserdata[idautor][ author=3D{\datasetvariable{autores}{\recurselevel}{nombre}}, cvlac=3D{\datasetvariable{autores}{\recurselevel}{cvlac}}, orcid=3D{\datasetvariable{autores}{\recurselevel}{orcid}}, gscholar=3D{\datasetvariable{autores}{\recurselevel}{gscholar}}, ]\stopuserdata % My "inlineuserdata" is empty... no idea if this is OK... } \stopdocument %%%%%%%%%% END MWE Thank you in advance. --=20 Andr=C3=A9s Conrado Montoya Andi K=C3=BA andresconrado@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org ---------------------------------------- Los fines no justifican los medios, porque la medida verdadera de nuestro car=C3=A1cter est=C3=A1 dada por los medios que estamos dispuestos a utiliz= ar, no por los fines que proclamamos. ---------------------------------------- =E2=80=9CYou develop an instant global consciousness, a people orientation,= an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, =E2=80=98Look at that, you so= n of a bitch.=E2=80=99=E2=80=9D =E2=80=94 Apollo 14 astronaut Edgar Mitchell --00000000000088a76b060314a4b2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello List.=C2=A0

I've been trying = to typeset a somewhat complex list of authors for several articles and a bo= ok.=C2=A0
My proof of concept seems to work fine, however, I know= I am doing weird things that I think could probably be done in a better wa= y. I'm using datasets and a recursion, kind of hacky but I can't fi= nd a better way of handling it. Specifically I would like to know:=C2=A0
1. Is there a way of getting the length of a filled dataset? (how m= any entries it contains)
2. Is it OK to use \startuserdata=C2=A0\= stopuserdata=C2=A0without its inlineuserdata? Is there an alternative that= =C2=A0does not require=C2=A0inlineuserdata?

%= %%%%%%%%% MWE:=C2=A0
\setupinteraction[state=3Dstart]

\de= fine[2]\imghref{\bgroup\goto{#1}[url(#2)]\egroup}
\defineexternalfigure[= logo][height=3D1em]

\definedataset[autores]

\setdataset[autor= es][
=C2=A0 nombre=3D{Angie Natalia Farf=C3=A1n Acevedo},
=C2=A0 cvla= c=3D{https://scienti.minciencias.gov.co/cv= lac/visualizador/generarCurriculoCv.do?cod_rh=3D0002125949},
=C2=A0 = orcid=3D{https://orcid.or= g/0009-0007-0765-4241},
=C2=A0 gscholar=3D{ht= tps://scholar.google.com/citations?user=3DGpYTTU0AAAAJ&hl=3Des&auth= user=3D1},
]
\setdataset[autores][
=C2=A0 nombre=3D{Ivon Andre= a Rodr=C3=ADguez Rom=C3=A1n}
=C2=A0 cvlac=3D{https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurricul= oCv.do?cod_rh=3D0000027033}
=C2=A0 orcid=3D{https://orcid.org/0009-0001-1183-6829}
=C2= =A0 gscholar=3D{https://scholar.google.com/citations?user=3Diz8SQNcAA= AAJ&hl=3Des}
]
\setdataset[autores][
=C2=A0 nombre=3D{Angi= e Caterin Garz=C3=B3n Gonz=C3=A1lez}
=C2=A0 cvlac=3D{https://scienti.minciencias.gov.co/cvlac/visualizador/genera= rCurriculoCv.do?cod_rh=3D0002128501}
=C2=A0 orcid=3D{https://orcid.org/0009-0009-0990-6902}
=C2=A0 gscholar=3D{
https://scholar.goo= gle.com/citations?view_op=3Dlist_works&hl=3Des&user=3D5WqcOeEAAAAJ<= /a>}
]
\setdataset[autores][
=C2=A0 nombre=3D{Heidy Paola Veira Te= norio}
=C2=A0 cvlac=3D{
https://scienti.= minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=3D000212= 7550}
=C2=A0 orcid=3D{https://orcid.org/0009-0008-4076-7317}
=C2=A0 gscholar=3D{https://scholar.google.es/citations?view_op=3Dnew_profile= &hl=3Des&authuser=3D1}
]
\setdataset[autores][
=C2=A0 = nombre=3D{Yerly Lorena Diaz Aldana}
=C2=A0 cvlac=3D{https://scienti.minciencias.gov.co/cvlac/visualizador/genera= rCurriculoCv.do?cod_rh=3D0002127754}
=C2=A0 orcid=3D{https://orcid.org/0009-0008-1720-4057}
=C2=A0 gscholar=3D{
https://scholar.google.com/citations?hl=3Des&user= =3D0obyCwkAAAAJ&view_op=3Dlist_works&gmla=3DAOV7GLPWRTK-xooHNe0iQ3u= ubfcSbG__GY_Guy35FdaqDJA3OfLLtp01-E1kzjxUhltlsfj494MaoQFkk9U9hCFYSipoR8aX0V= u2E6sV}
]

\defineuserdataalternative[idautor][renderingsetup= =3Duserdata:idautor]

\startsetups[userdata:idautor]
=C2=A0 \dontl= eavehmode
=C2=A0 \imghref
=C2=A0 =C2=A0 {\externalfigure[cvlac.pdf][l= ogo]}
=C2=A0 =C2=A0 {\userdataparameter{cvlac}}
=C2=A0 =C2=A0 \quad=C2=A0 \imghref
=C2=A0 =C2=A0 {\externalfigure[orcid.pdf][logo]}
= =C2=A0 =C2=A0 {\userdataparameter{orcid}}
=C2=A0 =C2=A0 \quad
=C2=A0 = \imghref
=C2=A0 =C2=A0 {\externalfigure[gscholar.pdf][logo]}
=C2=A0 = =C2=A0 {\userdataparameter{gscholar}}
=C2=A0 =C2=A0 \quad
=C2=A0 \use= rdataparameter{author}\par
\stopsetups

\defineuserdata[idautor][a= lternative=3Didautor]

\startdocument
=C2=A0 % I have to manually= set the length of the dataset in the loop and use recurselevel...
=C2=A0 % Maybe there is a way to use the length of the "autores&= quot; dataset? and use indexes?
=C2=A0 \dorecurse{5}{=C2=A0
= =C2=A0=C2=A0 =C2=A0\startuserdata[idautor][
=C2=A0 =C2=A0 =C2=A0 author= =3D{\datasetvariable{autores}{\recurselevel}{nombre}},
=C2=A0 =C2=A0 =C2= =A0 cvlac=3D{\datasetvariable{autores}{\recurselevel}{cvlac}},
=C2=A0 = =C2=A0 =C2=A0 orcid=3D{\datasetvariable{autores}{\recurselevel}{orcid}},=C2=A0 =C2=A0 =C2=A0 gscholar=3D{\datasetvariable{autores}{\recurselevel}{= gscholar}},
=C2=A0 =C2=A0 ]\stopuserdata=C2=A0% My "inlineuserdata&= quot; is empty... no idea if this is OK...
=C2=A0 }
\stopdocument%%%%%%%%%% END MWE

Thank you in advance.=C2= =A0

--
Andr=C3=A9s Conrado Montoy= a
Andi K=C3=BA
andresconrado@gmail.com
http://sesentaycuatro.com
http://chiquitico.org
----------------------------------------
Los fines no justifican= los medios, porque la medida verdadera de nuestro car=C3=A1cter est=C3=A1 = dada por los medios que estamos dispuestos a utilizar, no por los fines que= proclamamos.
----------------------------------------

=E2=80=9CYo= u develop an instant global consciousness, a people orientation,=20 an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international=20 politics look so petty. You want to grab a politician by the scruff of=20 the neck and drag him a quarter of a million miles out and say, =E2=80=98Lo= ok at that, you son of a bitch.=E2=80=99=E2=80=9D =E2=80=94 Apollo 14 astronaut = Edgar Mitchell

--00000000000088a76b060314a4b2-- --===============6325864507992300933== 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============6325864507992300933==--