Re: [NTG-context] Loop?

2021-02-13 Thread Hans Hagen
On 2/13/2021 2:23 PM, Angel M Alganza wrote: On Sat, Feb 13, 2021 at 12:12:47PM +0100, Wolfgang Schuster wrote: Using the \startsetups block to set the content for the loop/list makes it easier to strucuture (format) the text. With \recursestring you can print the value of the current loop ent

Re: [NTG-context] Loop?

2021-02-13 Thread Angel M Alganza
On Sat, Feb 13, 2021 at 12:12:47PM +0100, Wolfgang Schuster wrote: Using the \startsetups block to set the content for the loop/list makes it easier to strucuture (format) the text. With \recursestring you can print the value of the current loop entry. Very nice and easy to maintain the list

Re: [NTG-context] Loop?

2021-02-13 Thread Wolfgang Schuster
Angel M Alganza schrieb am 13.02.2021 um 11:42: On Fri, Feb 12, 2021 at 02:48:23PM -0500, Jairo A. del Rio wrote: Oh, I knew about the environment form, but I didn't know about El vie, 12 de feb. de 2021 a la(s) 14:25, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: You ca

Re: [NTG-context] Loop?

2021-02-13 Thread Angel M Alganza
On Fri, Feb 12, 2021 at 02:48:23PM -0500, Jairo A. del Rio wrote: Oh, I knew about the environment form, but I didn't know about El vie, 12 de feb. de 2021 a la(s) 14:25, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: You can use the commalist environment: Another way i

Re: [NTG-context] Loop?

2021-02-12 Thread Jairo A. del Rio
There's \processseparatedlist[][]\command with an arbitrary other than a comma... You should take a look at syst-aux.mkiv and syst-aux.mkxl to see more helpers: https://source.contextgarden.net/tex/context/base/mkiv/syst-aux.mkxl El vie, 12 de feb. de 2021 a la(s) 14:49, Angel M Alganza (a...@u

Re: [NTG-context] Loop?

2021-02-12 Thread Angel M Alganza
Hi Jairo: On Fri, Feb 12, 2021 at 01:50:58PM -0500, Jairo A. del Rio wrote: Hi, Ángel. Like this? \def\mylist{Fulano,Mengano,Sutano} \def\mycommand#1{#1\blank{\red Something here}\blank} \starttext \processcommacommand[\mylist]\mycommand \stoptext Yes, exactly like this, thank you. Now

Re: [NTG-context] Loop?

2021-02-12 Thread Jairo A. del Rio
Oh, I knew about the environment form, but I didn't know about \currentcommalistitem. Useful to avoid to define ad hoc commands :) As always, thank you very much for the lesson. Best regards, Jairo El vie, 12 de feb. de 2021 a la(s) 14:25, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) e

Re: [NTG-context] Loop?

2021-02-12 Thread Wolfgang Schuster
Jairo A. del Rio schrieb am 12.02.2021 um 19:50: 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

Re: [NTG-context] Loop?

2021-02-12 Thread Jairo A. del Rio
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 ( jairoadelr...@gmail.com) escribió: > Hi, Ángel. Like this? > > \def\mylist{Fulano,Mengano,Sutano} > > \def\mycommand#1{#1\blank{\red Something here}\blank} > > \starttext > > \processco

Re: [NTG-context] Loop?

2021-02-12 Thread Jairo A. del Rio
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

Re: [NTG-context] Loop?

2021-02-12 Thread Thomas A. Schmitz
On 2/12/21 7:39 PM, Angel M Alganza wrote: 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? https://wiki.contextgarden.net/Processing_Lists which wasn't particula

[NTG-context] Loop?

2021-02-12 Thread Angel M Alganza
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

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
\startmidaligned \startMPcode ... \stopMPcode \stopmidaligned 2015-10-05 20:31 GMT+02:00 Fabrice Couvreur : > How to center the title ? > > 2015-10-05 20:11 GMT+02:00 Fabrice Couvreur : > >> Hi Hans, >> In fact, as the loop does not work, I have not added to the code. >> It's true that your s

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
How to center the title ? 2015-10-05 20:11 GMT+02:00 Fabrice Couvreur : > Hi Hans, > In fact, as the loop does not work, I have not added to the code. > It's true that your solution is simple ! > Thank you, > Fabrice > > 2015-10-05 19:48 GMT+02:00 Hans Hagen : > >> On 10/5/2015 6:28 PM, Fabrice C

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
Hi Hans, In fact, as the loop does not work, I have not added to the code. It's true that your solution is simple ! Thank you, Fabrice 2015-10-05 19:48 GMT+02:00 Hans Hagen : > On 10/5/2015 6:28 PM, Fabrice Couvreur wrote: > >> Hi, >> I tried to write a loop to display the title, but it does not.

Re: [NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Hans Hagen
On 10/5/2015 6:28 PM, Fabrice Couvreur wrote: Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions color

[NTG-context] Loop and graphictext (Metafun)

2015-10-05 Thread Fabrice Couvreur
Hi, I tried to write a loop to display the title, but it does not. How to do ? Thank you, Fabrice \setuppagenumbering[location=] \setupcolors [state=start] \definecolor[pagecolor][s=.6] \definecolor[textcolor][r=.6] \startMPinclusions color pagecolor ; pagecolor := \MPcolor{pagecolor} ;

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-13 Thread Andreas Harder
Am 12.08.2009 um 23:22 schrieb Hans Hagen: Mojca Miklavec wrote: On Wed, Aug 12, 2009 at 12:51, Andreas Harder wrote: Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: Another way to do this is to use \TeXtext{1}{ABC} etc. and then call draw sometxt(i) For Sec 4.5 of Mojca's my way on some

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-13 Thread Andreas Harder
Am 13.08.2009 um 05:00 schrieb Aditya Mahajan:You just need to work a little harder.\startbuffer[1]This is a test\stopbuffer\startbuffer[2]Another test\stopbuffer\startbuffer[3]And again\stopbuffer\startluacode  userdata = userdata or {}  function userdata.shift(i)    return "(" .. i .. "cm ," .. i

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-12 Thread Aditya Mahajan
On Wed, 12 Aug 2009, Andreas Harder wrote: In the "real world“ I've stripped quotes form another document and stored them in buffer-environments (attachment). Save them as lua tables. Much easier to manipulate than tex objects. With your solution I've no idea how to incorporate them in a "au

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Andreas Harder
Am 12.08.2009 um 20:34 schrieb Mojca Miklavec: I'm sure that there's a workaround (or at least a dozen of other ways), but I have no time (and my computer is being repaired again) to inspect right now. Some tips? MKIV is both very powerful and fast, so you could probably also define strings

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-12 Thread Hans Hagen
Mojca Miklavec wrote: On Wed, Aug 12, 2009 at 12:51, Andreas Harder wrote: Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: Another way to do this is to use \TeXtext{1}{ABC} etc. and then call draw sometxt(i) For Sec 4.5 of Mojca's my way on sometxt http://dl.contextgarden.net/myway/sometxt.

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Hans Hagen
Aditya Mahajan wrote: On Wed, 12 Aug 2009, Andreas Harder wrote: Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: On Tue, 11 Aug 2009, Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-12 Thread Mojca Miklavec
On Wed, Aug 12, 2009 at 12:51, Andreas Harder wrote: > Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: > >> Another way to do this is to use >> >> \TeXtext{1}{ABC} etc. >> >> and then call >> >> draw sometxt(i) >> >> For Sec 4.5 of Mojca's my way on sometxt >> http://dl.contextgarden.net/myway/somet

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Andreas Harder
Am 12.08.2009 um 15:25 schrieb Aditya Mahajan: On Wed, 12 Aug 2009, Andreas Harder wrote: Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: On Tue, 11 Aug 2009, Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-12 Thread Aditya Mahajan
On Wed, 12 Aug 2009, Andreas Harder wrote: Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: On Tue, 11 Aug 2009, Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1ex,width=\paperwidth,he

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-12 Thread Andreas Harder
Am 12.08.2009 um 07:40 schrieb Aditya Mahajan: On Tue, 11 Aug 2009, Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1ex,width=\paperwidth,height=\paperheight] for i=1 upto 3: draw tex

Re: [NTG-context] loop textext and \MPstring{…}

2009-08-11 Thread Aditya Mahajan
On Tue, 11 Aug 2009, Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1ex,width=\paperwidth,height=\paperheight] for i=1 upto 3: draw textext(\MPstring{i}) shifted(i*cm,i*cm) ; endfor;

Re: [NTG-context] loop textext and \MPstring{… }

2009-08-11 Thread Hans Hagen
Andreas Harder wrote: Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1ex,width=\paperwidth,height=\paperheight] for i=1 upto 3: draw textext(\MPstring{i}) shifted(i*cm,i*cm) ; endfor; \stopMPpage \stop

[NTG-context] loop textext and \MPstring{… }

2009-08-11 Thread Andreas Harder
Hi, I am trying to achieve the following: \setMPtext{1}{ABC} \setMPtext{2}{DEF} \setMPtext{3}{GHI} \starttext \startMPpage[offset=1ex,width=\paperwidth,height=\paperheight] for i=1 upto 3: draw textext(\MPstring{i}) shifted(i*cm,i*cm) ; endfor; \stopMPpage \stoptext There is no error