From: "Jairo A. del Rio" <jairoadelrio6@gmail.com>
To: Angel M Alganza <ama@ugr.es>,
mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Loop?
Date: Fri, 12 Feb 2021 13:52:03 -0500 [thread overview]
Message-ID: <CAKyqqaYOwTHjfqcpcFTXv39HL6EA17Qk7d=acwh4ZD9Fzu2o6Q@mail.gmail.com> (raw)
In-Reply-To: <CAKyqqaYDf65DUoEajgJh9KOtt2TwmXAAfyA6tRMjLeS0EpmwDQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2208 bytes --]
Oops, it's "zutano". Sorry for the typo.
Jairo :)
El vie, 12 de feb. de 2021 a la(s) 13:50, Jairo A. del Rio (
jairoadelrio6@gmail.com) escribió:
> Hi, Ángel. Like this?
>
> \def\mylist{Fulano,Mengano,Sutano}
>
> \def\mycommand#1{#1\blank{\red Something here}\blank}
>
> \starttext
>
> \processcommacommand[\mylist]\mycommand
>
> \stoptext
>
> There are better ways to deal with data in ConTeXt, but it's basically
> that way, I think.
>
> Jairo
>
>
>
> El vie, 12 de feb. de 2021 a la(s) 13:44, Angel M Alganza (ama@ugr.es)
> escribió:
>
>> Hello:
>>
>> I am trying to print a list of names always followed by the same info
>> (generated by a new command). At the moment, I have all the names
>> followed by the command like so:
>>
>> Person Number One
>> \mycommand
>> Person Number Two
>> \mycommand
>> Person Number Three
>> \mycommand
>> Person Number Four
>> \mycommand
>> Person Number Five
>> \mycommand
>> .
>> .
>> .
>>
>> I'd rather have the list of people stored somewhere (a list? an array?)
>> and loop through it and then inserting \mynewcommand at compilation
>> time. That way, when I need to replace the list of people with a new
>> one, I'd just do that instead of building the above structure again and
>> again.
>>
>> Is it possible to do that with just ConTeXt or would I need to resort to
>> Lua. I guess it should be possible both ways, but I haven't figure out
>> how to do it. Any pointer, please?
>>
>> Thank you so much in advance.
>>
>> Cheers,
>> Ángel
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>>
>> ___________________________________________________________________________________
>>
>
[-- Attachment #1.2: Type: text/html, Size: 3838 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2021-02-12 18:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 18:39 Loop? Angel M Alganza
2021-02-12 18:50 ` Loop? Thomas A. Schmitz
2021-02-12 18:50 ` Loop? Jairo A. del Rio
2021-02-12 18:52 ` Jairo A. del Rio [this message]
2021-02-12 19:25 ` Loop? Wolfgang Schuster
2021-02-12 19:48 ` Loop? Jairo A. del Rio
2021-02-13 10:42 ` Loop? Angel M Alganza
2021-02-13 11:12 ` Loop? Wolfgang Schuster
2021-02-13 13:23 ` Loop? Angel M Alganza
2021-02-13 13:39 ` Loop? Hans Hagen
2021-02-12 19:49 ` Loop? Angel M Alganza
2021-02-12 19:57 ` Loop? Jairo A. del Rio
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='CAKyqqaYOwTHjfqcpcFTXv39HL6EA17Qk7d=acwh4ZD9Fzu2o6Q@mail.gmail.com' \
--to=jairoadelrio6@gmail.com \
--cc=ama@ugr.es \
--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).