From: Andres Conrado Montoya <andresconrado@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Experiments with \doloopoverlist
Date: Wed, 16 Aug 2023 20:50:18 -0500 [thread overview]
Message-ID: <CAGhDZhDOP-uCj9VZEgrGY-PA29QtNHurh0+5yOYiLKWmUihzmg@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4487 bytes --]
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=start]
\define[2]\imghref{\bgroup\goto{#1}[url(#2)]\egroup}
\defineexternalfigure[logo][height=1em]
\definedataset[autores]
\setdataset[autores][
nombre={Angie Natalia Farfán Acevedo},
cvlac={
https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0002125949
},
orcid={https://orcid.org/0009-0007-0765-4241},
gscholar={
https://scholar.google.com/citations?user=GpYTTU0AAAAJ&hl=es&authuser=1},
]
\setdataset[autores][
nombre={Ivon Andrea Rodríguez Román}
cvlac={
https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0000027033
}
orcid={https://orcid.org/0009-0001-1183-6829}
gscholar={https://scholar.google.com/citations?user=iz8SQNcAAAAJ&hl=es}
]
\setdataset[autores][
nombre={Angie Caterin Garzón González}
cvlac={
https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0002128501
}
orcid={https://orcid.org/0009-0009-0990-6902}
gscholar={
https://scholar.google.com/citations?view_op=list_works&hl=es&user=5WqcOeEAAAAJ
}
]
\setdataset[autores][
nombre={Heidy Paola Veira Tenorio}
cvlac={
https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0002127550
}
orcid={https://orcid.org/0009-0008-4076-7317}
gscholar={
https://scholar.google.es/citations?view_op=new_profile&hl=es&authuser=1}
]
\setdataset[autores][
nombre={Yerly Lorena Diaz Aldana}
cvlac={
https://scienti.minciencias.gov.co/cvlac/visualizador/generarCurriculoCv.do?cod_rh=0002127754
}
orcid={https://orcid.org/0009-0008-1720-4057}
gscholar={
https://scholar.google.com/citations?hl=es&user=0obyCwkAAAAJ&view_op=list_works&gmla=AOV7GLPWRTK-xooHNe0iQ3uubfcSbG__GY_Guy35FdaqDJA3OfLLtp01-E1kzjxUhltlsfj494MaoQFkk9U9hCFYSipoR8aX0Vu2E6sV
}
]
\defineuserdataalternative[idautor][renderingsetup=userdata: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=idautor]
\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={\datasetvariable{autores}{\recurselevel}{nombre}},
cvlac={\datasetvariable{autores}{\recurselevel}{cvlac}},
orcid={\datasetvariable{autores}{\recurselevel}{orcid}},
gscholar={\datasetvariable{autores}{\recurselevel}{gscholar}},
]\stopuserdata % My "inlineuserdata" is empty... no idea if this is
OK...
}
\stopdocument
%%%%%%%%%% END MWE
Thank you in advance.
--
Andrés Conrado Montoya
Andi Kú
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ácter está dada por los medios que estamos dispuestos a utilizar, no por
los fines que proclamamos.
----------------------------------------
“You 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, ‘Look at that, you son of a
bitch.’” — Apollo 14 astronaut Edgar Mitchell
[-- Attachment #1.2: Type: text/html, Size: 6773 bytes --]
[-- Attachment #2: Type: text/plain, Size: 495 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next reply other threads:[~2023-08-17 1:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 1:50 Andres Conrado Montoya [this message]
2023-08-17 8:08 ` [NTG-context] " Hans Hagen via ntg-context
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=CAGhDZhDOP-uCj9VZEgrGY-PA29QtNHurh0+5yOYiLKWmUihzmg@mail.gmail.com \
--to=andresconrado@gmail.com \
--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).