based alternative.
\starttext
\startcollecting
%
\startcollect
\startcombination[3*1]
\stopcollect
%
\dorecurse{3}
{\startcollect
{\externalfigure[dummy]}{}
\stopcollect}
%
\startcollect
\stopcombination
\stopcollect
%
\stopcollecting
\stoptext
Wolfgang
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
Hi, I’d like to place pages from a multipage PDF in a combination:
\startcombination[3*1]
\dorecurse{3}{%
{\externalfigure[multipage][width=\textwidth/3,page=\recurselevel]}{}
}
\stopcombination
That doesn’t work, because ConTeXt expects a { after \startcombination.
(“A left brace
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
\starttabulate[|c|]
\dorecurse{9}{\expanded{\NC \recurselevel \NC\NR}}
\stoptabulate
\stoptext
Wolfgang
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
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 example.
Does the tabulate cause the error?
What
> 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
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.
> > > T
\dorecurse{8}
{\startxrow\startxcell \recurselevel \stopxcell\stopxrow}
\stopxtable
\stoptext
Best regards: Otared K.
> On 21 Sep 2020, at 16:07, Jeong Dal wrote:
>
> Hi,
>
> I tried to make a table using \dorecurse or \doloop as in the example.
> There is no error
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
2020 a la(s) 09:16, Jeong Dal (hak...@me.com)
escribió:
> 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
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 i
On 6/14/2020 11:41 PM, Pablo Rodriguez wrote:
Dear list,
I have the following sample:
\starttext
\dorecurse{25}{\recurselevel\par}
\doloopoverstring{a,b,c}{\recursestring}
}
\stoptext
Both LMTX and MkIV complain about \recursestring for being undefined.
I wonder
Dear list,
I have the following sample:
\starttext
\dorecurse{25}{\recurselevel\par}
\doloopoverstring{a,b,c}{\recursestring}
}
\stoptext
Both LMTX and MkIV complain about \recursestring for being undefined.
I wonder whether this is inteded or it is a bug.
Many thanks
Hi,
I cannot make \beginBLOCKS and \endBLOCKS work in a \dorecurse loop. Is
it possible?
Here is a minimum non working exemple (from
https://wiki.contextgarden.net/Command/defineblock):
%%
\startdocument
\defineblock[question]
\hideblocks[question] % We don't want to print blocks where we
> 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'
ahajan 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 they should,
separately. Please tell m
9 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 li
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
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
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
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 what I am doing wrong
) of p;%
draw q withcolor red;
fill fullcircle scaled 3 shifted point length q of q withcolor blue;
setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
\stopuseMPgraphic
\starttext
\startanimation[menu=yes, menucolor=blue, framerate=5]
\dorecurse{20}
{\expanded{\frame{
\useMPgraphic
;
N:=20;
sn:= \MPvar{s};
q := subpath (0, sn/N*L) of p;%
draw q withcolor red;
fill fullcircle scaled 3 shifted point length q of q withcolor blue;
setbounds currentpicture to unitsquare shifted (-0.5,-0.5) scaled 75;
\stopuseMPgraphic
\starttext
\startanimation
\dorecurse{20}
{\startexpanded
;
\stopuseMPgraphic
\starttext
\startanimation
\dorecurse{20}
{\startexpanded
%\setupMPvariables[Circles][s]
\useMPgraphic{Circles}{s=\recurselevel}
\stopexpanded}
\stopanimation
\stoptext
%%
However, it just draw 20 figures instead of making an animation.
Would you please tell
\startanimation
{ \dorecurse{5}{%
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
}}
\stopanimation
\stoptext
It seems to me that \startanimation just treat the figures
{\dorecurse … } as just one figure.
Is there a way to treat it 5 figures to generate animation?
Thank
;
draw fullcircle scaled \MPrawvar{Circles}{s}u;
\stopbuffer
\starttext
\startanimation
{ \dorecurse{5}{%
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
}}
\stopanimation
\stoptext
It seems to me that \startanimation just treat the figures
{\dorecurse … } as just
Is there a way to empty the blocks after each recurse cycle.
If i make three exams with the command \dorecurse[3], in the first exam i
found the hints and the answers of all exams.
I try with the commands \resetnumber[hint, answer], but don't work.
begin question-hint-answer-blocks.tex
Am 15.01.2014 um 15:06 schrieb DesdeChaves desdecha...@gmail.com:
Please, can someone provide some assistance in resolving this problem, if
possible. I need to prepare a worksheet for Friday and I'm having this
problem, ie, each worksheet show the hints and the answers of all worksheets.
Thank you.
Jorge
2014/1/15 Wolfgang Schuster schuster.wolfg...@gmail.com
Am 15.01.2014 um 15:06 schrieb DesdeChaves desdecha...@gmail.com:
Please, can someone provide some assistance in resolving this problem, if
possible. I need to prepare a worksheet for Friday and I'm having this
Is there a way to empty the blocks after each recurse cycle.
If i make three exams with the command \dorecurse[3], in the first exam i
found the hints and the answers of all exams.
I try with the commands \resetnumber[hint, answer], but don't work.
begin question-hint-answer-blocks.tex
Hello,
Does anyone have a suggestion how to use \dorecurse within combinations?
(without having to use lua...)
Alan
minimal example:
\starttext
\startcombination [2]
\dorecurse{2}{{#1}{#1}}
\stopcombination
\stoptext
! Missing { inserted.
system tex error on line 3 in file
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
___
If your question
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
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
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
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:
http://wiki.contextgarden.net
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
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
but that doesn't solve the problem
in this case.
I would think that the following code is equivalent:
\blank
\SetTableToWidth{\textwidth}
\starttable[|lp(0.90\textwidth)|]
Some text \SR
\dorecurse{4}{
\SR
\HL
}
\stoptable
\blank
But it is not. I get
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
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 rows in the table.
When
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
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 rows
in the table. When the \recurselevel is retrieved in normal text
it works as expected.
Please refer
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
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 :-(
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
%%% 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 \expandafter in your document?
TeX version, not context ... :)
btw
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
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
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
\dorecurse{6}
{\expandafter \bTD \recurselevel \eTD}
\eTR
\dorecurse{6}
{\bTR
\edef\firstrecurselevel{\recurselevel}
\expandafter\bTD \recurselevel \eTD
\dorecurse{6}
{\expandafter
\bTD
\the\numexpr\firstrecurselevel+\recurselevel\relax
\eTD}
\eTR}
\eTABLE
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
:
You don't need as many \expandafter as you did in your example,
one before \bTD in each loop is enough.
\bTABLE
\bTR
\bTD $(+)$ \eTD
\dorecurse{6}
{\expandafter \bTD \recurselevel \eTD}
\eTR
\dorecurse{6}
{\bTR
\edef\firstrecurselevel{\recurselevel}
\expandafter\bTD \recurselevel \eTD
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
with the \expandafter before \bTD.
\for loop:
This does not work, for the same reason that the \dorecurse solution
does not work. You need to exapnad \x and \y in the first row and
first column.
I should next time check the output. Sure, the same rules as \dorecurse
apply to the \for loop
\dorecurse{5}
{\bTR \bTD \recurselevel. \eTD
\bTD \recurselevel \eTD\eTR}
\eTABLE
\dorecurse{2}
{\recurselevel. \recurselevel\crlf}
\stoptext
works ok here with latest minimals
This is LuaTeX, Version snapshot-0.35.0-2009022702 (Web2C 7.5.7)
ConTeXt ver: 2008.11.10 21:40 MKIV fmt
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
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
for a normal user, I should keep this in
my mind.
Are you sure ?
What is a normal user ?
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.
As soon as you use \dorecurse , you become
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
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
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
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
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
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
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
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
\dorecurse{2}
{\recurselevel. \recurselevel
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 \eTD\eTR
\dorecurse{5}
{\bTR \bTD \recurselevel. \eTD
\bTD \recurselevel \eTD\eTR}
\eTABLE
\dorecurse{2}
{\recurselevel. \recurselevel\crlf}
\stoptext
works ok here with latest minimals
This is LuaTeX, Version snapshot-0.35.0-2009022702 (Web2C 7.5.7)
ConTeXt ver: 2008.11.10 21:40 MKIV fmt
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
\dorecurse{5
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
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
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
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
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
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
77 matches
Mail list logo