Re: [NTG-context] dorecurse within combination

2022-07-07 Thread Wolfgang Schuster via ntg-context
Henning Hraban Ramm via ntg-context schrieb am 07.07.2022 um 21:25: Am 07.07.22 um 20:52 schrieb Henning Hraban Ramm via ntg-context: How can I do this? Sorry for the noise, I solved it with Lua. The cld manual even contains a combinations example. The Lua method is also simpler than a TeX

Re: [NTG-context] dorecurse within combination

2022-07-07 Thread Henning Hraban Ramm via ntg-context
Am 07.07.22 um 20:52 schrieb Henning Hraban Ramm via ntg-context: How can I do this? Sorry for the noise, I solved it with Lua. The cld manual even contains a combinations example. Hraban ___ If your question

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Jeong Dal
Dear Aditya, Jairo, Wolfgang, and Otared, Thank you for the replies and explanations. I also read the blog. In this case, using '##1’ is an easy way. For more complex table, I may use luacode. Thanks again. Best regards, Dalyoung

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Wolfgang Schuster
Jeong Dal schrieb am 21.09.2020 um 20:54: Dear Aditya, Jairo, Wolfgang, and Otared, Thank you for the replies and explanations. I also read the blog. In this case, using '##1’ is an easy way. For more complex table, I may use luacode. I forgot the obvious \expanded solution: \starttext

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian
> On 21 Sep 2020, at 16:42, Aditya Mahajan wrote: > > On Mon, 21 Sep 2020, Wolfgang Schuster wrote: > >> Aditya Mahajan schrieb am 21.09.2020 um 16:35: >>> […] > > You gave the same reply 11 years ago :-) which is also listed in the blog > post. … Which shows that some things don't change

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Aditya Mahajan
On Mon, 21 Sep 2020, Wolfgang Schuster wrote: > Aditya Mahajan schrieb am 21.09.2020 um 16:35: > > On Mon, 21 Sep 2020, Jeong Dal wrote: > > > > > Hi, > > > > > > I tried to make a table using \dorecurse or \doloop as in the example. > > > There is no error but \recurselevel is not increased,

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Otared Kavian
Hi Dalyoung, I don't know why \recurselevel returns 0 inside a tabulate environment, but the following works fine: \starttext \startxtable[frame=off,bottomframe=on,width=1cm,align={middle,lohi}] \startxrow\startxcell \stopxcell\stopxrow % just to have a line on the top of the first row

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Wolfgang Schuster
Aditya Mahajan schrieb am 21.09.2020 um 16:35: On Mon, 21 Sep 2020, Jeong Dal wrote: Hi, I tried to make a table using \dorecurse or \doloop as in the example. There is no error but \recurselevel is not increased, all are 0 in the first example and only two rows are created with the

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Jairo A. del Rio
Hi, Using ##1 instead of \recurselevel makes it work in this specific case if you want a quick and dirty solution. It seems to be a thing with nesting, as using #1 complains. I'd prefer the solutions as shown by Aditya: constructing tables via Lua, etc. Regards, Jairo El lun., 21 de sep. de

Re: [NTG-context] \dorecurse{}{} problem

2020-09-21 Thread Aditya Mahajan
On Mon, 21 Sep 2020, Jeong Dal wrote: > Hi, > > I tried to make a table using \dorecurse or \doloop as in the example. > There is no error but \recurselevel is not increased, all are 0 in the first > example and only two rows are created with the \recurselevel 0 and 2 only in > the second

Re: [NTG-context] dorecurse problem

2017-01-20 Thread Otared Kavian
> On 20 Jan 2017, at 18:00, Rik Kabel wrote: > […] > > Otared, > > I am not sure what you are doing, but if you are using only the code snippet > that Hans posted, you will get a blank page. You have to define the layer and > page background in addition to Hans'

Re: [NTG-context] dorecurse problem

2017-01-20 Thread Rik Kabel
On 2017-01-20 11:42, Otared Kavian wrote: Hi Hans, Unfortunately your workaround with \getbuffer does not produce the correct page: it gives only a blank page. Thanks for your attention: OK On 20 Jan 2017, at 10:08, Hans Hagen wrote: On 1/20/2017 8:59 AM, Aditya Mahajan

Re: [NTG-context] dorecurse problem

2017-01-20 Thread Otared Kavian
Hi Hans, Unfortunately your workaround with \getbuffer does not produce the correct page: it gives only a blank page. Thanks for your attention: OK > On 20 Jan 2017, at 10:08, Hans Hagen wrote: > > On 1/20/2017 8:59 AM, Aditya Mahajan wrote: >> On Thu, 19 Jan 2017, Rik Kabel

Re: [NTG-context] dorecurse problem

2017-01-20 Thread Hans Hagen
On 1/20/2017 8:59 AM, Aditya Mahajan wrote: On Thu, 19 Jan 2017, Rik Kabel wrote: ConTeXters, When \dorecurse is active in the following MWE, the lines of text are overprinted. At least, this is the case for me, please confirm it for yourself. When \dorecurse is disabled, the lines print as

Re: [NTG-context] dorecurse problem

2017-01-20 Thread Aditya Mahajan
On Thu, 19 Jan 2017, Rik Kabel wrote: ConTeXters, When \dorecurse is active in the following MWE, the lines of text are overprinted. At least, this is the case for me, please confirm it for yourself. When \dorecurse is disabled, the lines print as they should, separately. Please tell me

Re: [NTG-context] dorecurse problem

2017-01-19 Thread Otared Kavian
Hi Rik, I can confirm the behaviour you are reporting (even without \startstandardmakeup—\stopstandardmakeup, but adding a line of text in the document in order to have an output). It seems that \dorecurse suppresses the passage to another line, since if one says \dorecurse{10} the texts in

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread luigi scarso
On Fri, Oct 26, 2012 at 11:50 AM, Alan BRASLAU alan.bras...@cea.fr wrote: Does anyone have a solution to \dorecurse within TABLE? Alan Minimal example: \starttext \dorecurse{8}{\recurselevel\crlf} \bTABLE \dorecurse{8}{\bTR\bTD\recurselevel\eTD\eTR} \eTABLE \stoptext

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread Marco Patzer
2012-10-26 Alan BRASLAU: Does anyone have a solution to \dorecurse within TABLE? Alan Minimal example: \starttext \dorecurse{8}{\recurselevel\crlf} \bTABLE \dorecurse{8}{\bTR\bTD\recurselevel\eTD\eTR} \dorecurse{8}{\expanded{\bTR\bTD\recurselevel\eTD\eTR}} \eTABLE \stoptext

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread Alan BRASLAU
On Fri, 26 Oct 2012 12:27:09 +0200 Marco Patzer home...@lavabit.com wrote: \dorecurse{8}{\expanded{\bTR\bTD\recurselevel\eTD\eTR}} Thank you. And I found something new to understand: http://wiki.contextgarden.net/System_Macros/Expansion_Control Now, is there some better way, or perhaps not,

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread Wolfgang Schuster
Am 26.10.2012 um 15:03 schrieb Alan BRASLAU alan.bras...@cea.fr: On Fri, 26 Oct 2012 12:27:09 +0200 Marco Patzer home...@lavabit.com wrote: \dorecurse{8}{\expanded{\bTR\bTD\recurselevel\eTD\eTR}} Thank you. And I found something new to understand:

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread Marco Patzer
2012-10-26 Alan BRASLAU: Now, is there some better way, or perhaps not, around creating my own counter (of course, I can use a counter for the column as well...) You can use \currentTABLEcolumn and \currentTABLErow \starttext \bTABLE \dorecurse{8}{ \bTR \dorecurse{5}{\bTD

Re: [NTG-context] \dorecurse within TABLE

2012-10-26 Thread Alan BRASLAU
Helps to read the wiki, with a link to: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Simple enough: \starttext \bTABLE \dorecurse{8}{ \bTR \dorecurse{5}{\bTD \the\numexpr#1,\the\numexpr##1 \eTD} \eTR } \eTABLE

Re: [NTG-context] dorecurse in table

2010-09-06 Thread Aditya Mahajan
On Mon, 6 Sep 2010, Cecil Westerhof wrote: The following code does what I want: \blank \SetTableToWidth{\textwidth} \starttable[|lp(0.90\textwidth)|] Some text \SR \SR \HL \SR \HL \SR \HL \SR \HL \stoptable \blank The correct syntax is \NC ... \NC \SR

Re: [NTG-context] dorecurse in table

2010-09-06 Thread Cecil Westerhof
Op maandag 6 sep 2010 23:18 CEST schreef Aditya Mahajan: The following code does what I want: \blank \SetTableToWidth{\textwidth} \starttable[|lp(0.90\textwidth)|] Some text \SR \SR \HL \SR \HL \SR \HL \SR \HL \stoptable \blank [CUT] Table and expansion are tricky. The error is

Re: [NTG-context] dorecurse...

2010-02-21 Thread Wolfgang Schuster
Am 21.02.10 11:37, schrieb Willi Egger: Hello, I was busy to build a larger table with a lot of empty but numbered rows. So I thought to use the \dorecurse macro to help me. Now I can't recall the actual value of \recurselevel. Interestingly it fails only when calling for preparing whole

Re: [NTG-context] dorecurse...

2010-02-21 Thread Willi Egger
Hello Wolfgang, Thank yo very much, indeed! Hm, that I see your answer I think I have seen this earlier :-( Willi On Feb 21, 2010, at 12:07 PM, Wolfgang Schuster wrote: Am 21.02.10 11:37, schrieb Willi Egger: Hello, I was busy to build a larger table with a lot of empty but numbered

Re: [NTG-context] dorecurse...

2010-02-21 Thread Wolfgang Schuster
Am 21.02.10 17:51, schrieb Willi Egger: Hm, that I see your answer I think I have seen this earlier :-( http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Wolfgang

Re: [NTG-context] dorecurse...

2010-02-21 Thread Willi Egger
No! Even with a comment on my own account ;-( very bad! Thanks Willi On Feb 21, 2010, at 5:57 PM, Wolfgang Schuster wrote: Am 21.02.10 17:51, schrieb Willi Egger: Hm, that I see your answer I think I have seen this earlier :-(

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Wolfgang Schuster
Am 06.03.2009 um 07:41 schrieb luigi scarso: My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ It's exactly what I think . Thank you very much. Nice article, it fits perfectly in the programming section of the

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Willi Egger
Hi Aditya, Happy luaTeXing. Great summary. Willi On Mar 6, 2009, at 4:05 AM, Aditya Mahajan wrote: On Thu, 5 Mar 2009, luigi scarso wrote: On Thu, Mar 5, 2009 at 12:09 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 01:17 schrieb luigi scarso: \starttext

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Curious Learn
Aditya Mahajan adityam at umich.edu writes: My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Aditya I like the Luatex code of Luigi. Though it is longer than what Wolfgang suggested (and in this case, I am

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Arthur Reutenauer
Do I pick up any beginners book on Lua? There really is only one beginners book on Lua :-) _Programming in Lua_, by Roberto Ierusalimschy, the Lua author. There are a few other books, mostly about Lua and games, because Lua has become quite popular in the gamers' community, but

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread luigi scarso
I like the Luatex code of Luigi. Though it is longer than what Wolfgang suggested (and in this case, I am using Wolfgang's solution now that I know about it), the luatex code seems to be the kind of programming that I am more comfortable with. In fact, in Latex when I was trying to achieve

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Wolfgang Schuster
Am 06.03.2009 um 04:05 schrieb Aditya Mahajan: My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Nice article but I have a few corrections for you. Table setup: To achieve horizontal and vertical centered

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Curious Learn
Arthur and Luigi, thanks for your responses. Arthur, your response makes it very clear, what I need to do. I will start with the book you recommend. ___ If your question is of interest to others as well, please

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Aditya Mahajan
On Fri, 6 Mar 2009, Wolfgang Schuster wrote: Am 06.03.2009 um 04:05 schrieb Aditya Mahajan: My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ Nice article but I have a few corrections for you. Table setup:

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Aditya Mahajan
On Thu, 5 Mar 2009, Aditya Mahajan wrote: On Thu, 5 Mar 2009, luigi scarso wrote: On Thu, Mar 5, 2009 at 12:09 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 01:17 schrieb luigi scarso: \starttext %%% TeX version \bTABLE \dorecurse{5} {\bTR\expandafter \bTD

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-06 Thread Wolfgang Schuster
Am 06.03.2009 um 17:33 schrieb Aditya Mahajan: Table setup: To achieve horizontal and vertical centered content in the table cell you need 'align={middle,lohi}'. Hmm... align={middle,middle} also works. I haven't checked the code to see why. I hadn't known this before but it's feature

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
On Wed, Mar 4, 2009 at 8:53 PM, luigi scarso luigi.sca...@gmail.com wrote: On Wed, Mar 4, 2009 at 8:35 PM, Curious Learn curiousle...@gmail.com wrote: Can someone please explain why the second example below works but the first does not work? Thanks very much. \starttext \bTABLE

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread Wolfgang Schuster
Am 05.03.2009 um 01:17 schrieb luigi scarso: \starttext %%% TeX version \bTABLE \dorecurse{5} {\bTR\expandafter \bTD \recurselevel. \eTD\expandafter \bTD \recurselevel \eTD\eTR} \eTABLE \dorecurse{2} {\recurselevel. \recurselevel\crlf} And you think it's a good idea to use

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
On Thu, Mar 5, 2009 at 12:09 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 01:17 schrieb luigi scarso: \starttext %%% TeX version \bTABLE \dorecurse{5} {\bTR\expandafter \bTD \recurselevel. \eTD\expandafter        \bTD \recurselevel  \eTD\eTR} \eTABLE

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread Wolfgang Schuster
Am 05.03.2009 um 12:27 schrieb luigi scarso: And you think it's a good idea to use \expandafter in your document? TeX version, not context ... :) btw \expandafer is not so bad, if used moderatly . But don't make a beginner used to it, e.g. Stefan Kottwitz mentioned a few times how to

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
People who want to use TeX to write a document but copy code from examples, old list messages etc. but don't why they have to do it something like this. OK, it's hard to write a fancy layout without defining your own header styles etc. without a definition but use then as many high level

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread Wolfgang Schuster
Am 05.03.2009 um 14:23 schrieb luigi scarso: http://texblog.net/latex-archive/plaintex/expandafter/ hey, this is not a moderate use of expandafter as I intended .. I dropped latex for similar examples . In this situation please, grep setvalue base/* ??? I can't understand the relation

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
On Thu, Mar 5, 2009 at 2:52 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 14:23 schrieb luigi scarso: http://texblog.net/latex-archive/plaintex/expandafter/ hey, this is not a moderate use of expandafter as I intended .. I dropped latex for similar examples

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread Wolfgang Schuster
Am 05.03.2009 um 15:23 schrieb luigi scarso: I prefear \setvalue{quote small}{\quote\small} {\getvalue{quote small} foo } This is non trivial example, normally I would define a new quote command with \definedelimitedtext[quotesmall][quote] but you above code can't be achieved with

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
On Thu, Mar 5, 2009 at 3:53 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 15:23 schrieb luigi scarso: I prefear \setvalue{quote small}{\quote\small} {\getvalue{quote small} foo } This is non trivial example, normally I would define a new quote command

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread Aditya Mahajan
On Thu, 5 Mar 2009, luigi scarso wrote: On Thu, Mar 5, 2009 at 12:09 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 05.03.2009 um 01:17 schrieb luigi scarso: \starttext %%% TeX version \bTABLE \dorecurse{5} {\bTR\expandafter \bTD \recurselevel. \eTD\expandafter        \bTD

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-05 Thread luigi scarso
My summary of this thread: http://randomdeterminism.wordpress.com/2009/03/05/tex-programming-the-past-the-present-and-the-future/ It's exactly what I think . Thank you very much. -- luigi ___ If your question is

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread luigi scarso
On Wed, Mar 4, 2009 at 8:35 PM, Curious Learn curiousle...@gmail.com wrote: Can someone please explain why the second example below works but the first does not work? Thanks very much. \starttext \bTABLE \dorecurse{5} {\bTR \bTD \recurselevel. \eTD          \bTD \recurselevel  

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread luigi scarso
On Wed, Mar 4, 2009 at 8:53 PM, luigi scarso luigi.sca...@gmail.com wrote: On Wed, Mar 4, 2009 at 8:35 PM, Curious Learn curiousle...@gmail.com wrote: Can someone please explain why the second example below works but the first does not work? Thanks very much. \starttext \bTABLE

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Wolfgang Schuster
Am 04.03.2009 um 20:35 schrieb Curious Learn: Can someone please explain why the second example below works but the first does not work? Thanks very much. \starttext \bTABLE \dorecurse{5} {\bTR \bTD \recurselevel. \eTD \bTD \recurselevel \eTD\eTR} \eTABLE \bTABLE

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Curious Learn
Wolfgang Schuster schuster.wolfgang at googlemail.com writes: \bTABLE \dorecurse{5}{\bTR\expanded{\bTD\recurselevel\eTD}\eTR} \eTABLE Wolfgang As your other solutions, this worked great. I suppose I have to use \expanded for every \bTD \eTD pair. Can you please explain why this is

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Wolfgang Schuster
Am 04.03.2009 um 21:57 schrieb Curious Learn: Wolfgang Schuster schuster.wolfgang at googlemail.com writes: \bTABLE \dorecurse{5}{\bTR\expanded{\bTD\recurselevel\eTD}\eTR} \eTABLE As your other solutions, this worked great. I suppose I have to use \expanded for every \bTD \eTD pair.

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Aditya Mahajan
On Wed, 4 Mar 2009, Wolfgang Schuster wrote: \bTABLE \dorecurse{5}{\bTR\bTD#1\eTD\eTR} \eTABLE This is evil genious! Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki!

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Wolfgang Schuster
Am 04.03.2009 um 22:43 schrieb Aditya Mahajan: On Wed, 4 Mar 2009, Wolfgang Schuster wrote: \bTABLE \dorecurse{5}{\bTR\bTD#1\eTD\eTR} \eTABLE This is evil genious! Can be used nested too. \starttext \bTABLE \dorecurse{5} {\bTR \dorecurse{5}{\bTD#1:##1\eTD} \eTR} \eTABLE

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Curious Learn
Not really. \bTABLE \dorecurse{5}{\bTR\bTD#1\eTD\eTR} \eTABLE Wolfgang Awesome How does one learn these things? Is this Tex programming or Context programming. Thanks very much. ___ If your

Re: [NTG-context] \dorecurse and \recurselevel in Natural Tables

2009-03-04 Thread Wolfgang Schuster
Am 04.03.2009 um 23:17 schrieb Curious Learn: Not really. \bTABLE \dorecurse{5}{\bTR\bTD#1\eTD\eTR} \eTABLE Wolfgang Awesome How does one learn these things? Follow the mailing list and read parts of the source. Is this Tex programming or Context programming. It's a ConTeXt