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




___
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
___


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

\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@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
___


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 in ConTeXt :-)

Kidding aside, why is there a difference between the tabulate mechanism and the 
xtable mechanism?

Best regards: Otared K.
___
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
___


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, 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 is wrong in this MWE?
> > \dorecurse does not expand its arguments. See this old blog post for a
> > discussion on this:
> > 
> > https://adityam.github.io/context-blog/post/tex-programming/
> 
> \starttext
> 
> \starttabulate[|c|]
> \dorecurse{8}{\NC ##1 \NC\NR}
> \stoptabulate
> 
> \stoptext

You gave the same reply 11 years ago :-) which is also listed in the blog post.

Aditya
___
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
___


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
\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 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 is wrong in this MWE?
> 
> Thank you for reading.
> 
> Best regards,
> 
> Dalyoung
> 
> *
> \startbuffer[AdjacencyList1]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \dorecurse{8}
>{\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
> 
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \doloop{
>\ifnum \recurselevel=7
>   \exitloop
>\fi
>\NC \recurselevel \NC \NC\NR \HL
> }
> \stoptabulate
> \stopbuffer
> 
> \starttext
> \getbuffer[AdjacencyList1]
> 
> \getbuffer[AdjacencyList2]
> \stoptext
> 
>> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성:
>> 
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>> 
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. Parallel text support (Denis Maier)
>>   2. Re: Parallel text support (Taco Hoekwater)
>>   3. Re: ZapfDingbats Unicode differences MKIV vs LMTX
>>  (Christoph Reller)
>>   4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen)
>>   5. Math fonts for Nimbus fonts (Otared Kavian)
>>   6. Re: 2020 Meeting recordings? (Taco Hoekwater)
>> 
>> 
>> --
>> 
>> Message: 1
>> Date: Mon, 21 Sep 2020 12:21:37 +0200
>> From: Denis Maier 
>> To: ntg-context@ntg.nl
>> Subject: [NTG-context] Parallel text support
>> Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>> 
>> Hi,
>> 
>> I'm trying to typeset a parallel text that should appear in columns. The 
>> sources are XML, and there I have to use tables for this. So, I thought 
>> the easiest way is to use extreme tables for this:
>> 
>> =
>> \starttext
>> 
>> \dorecurse{3}{\input knuth}
>> 
>> \startxtable[split=yes,frame=off]
>> \startxrow
>> \startxcell Text \stopxcell
>> \startxcell Übersetzung \stopxcell
>> \stopxrow
>> \startxrow
>> \startxcell \input ward \stopxcell
>> \startxcell \input tufte \stopxcell
>> \stopxrow
>> \stopxtable
>> 
>> \stoptext
>> =
>> 
>> However, as it turns out, split only seems to mean that the table is 
>> split between rows, individual rows stay on the same page.
>> 
>> Is there a better approach? I've found the page-streams, but that seems 
>> to be too much...
>> 
>> Best,
>> Denis
>> 
>> 
>> --
>> 
>> Message: 2
>> Date: Mon, 21 Sep 2020 13:58:11 +0200
>> From: Taco Hoekwater 
>> To: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] Parallel text support
>> Message-ID: 
>> Content-Type: text/plain;charset=utf-8
>> 
>> 
>> 
>>> On 21 Sep 2020, at 12:21, Denis Maier  wrote:
>>> 
>>> 
>>> However, as it turns out, split only seems to mean that the table is split 
>>> between rows, individual rows stay on the same page.
>>> 
>>> Is there a better approach? I've found the page-streams, but that seems to 
>>> be too much…
>> 
>> \starttabulate
>> 
>> 
>> 
>> --
>> 
>> Message: 3
>> Date: Mon, 21 Sep 2020 14:55:02 +0200
>> From: Christoph Reller 
>> To: Hans Hagen 
>> Cc: mailing list for ConTeXt users 
>> Subject: Re: [NTG-context] ZapfDingbats Unicode differences MKIV vs
>>  LMTX
>> Message-ID:
>>  
>> Content-Type: text/plain; charset="utf-8"
>> 
>> On Sat, Sep 19, 2020 at 12:04 PM Hans Hagen  wrote:
>> 
>>> On 9/19/2020 6:18 AM, Christoph Reller wrote:
 On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen >>> > wrote:
 
On 9/18/2020 11:23 AM, Christoph Reller wrote:
 
>>> \definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
> \usemodule [fnt-10]
> \starttext
> (1) \getglyphdirect{ZapfDingbats}{61491}\crlf % MKIV log: char 
> (U+0F033) in font 'ZapfDingbats-4' with id 8: missing
> (2) 

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 \recurselevel 0 and 2 only in 
the second example.

Does the tabulate cause the error?
What is wrong in this MWE?

\dorecurse does not expand its arguments. See this old blog post for a 
discussion on this:

https://adityam.github.io/context-blog/post/tex-programming/


\starttext

\starttabulate[|c|]
\dorecurse{8}{\NC ##1 \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@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
___


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 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 0 and 2
> only in the second example.
>
> Does the tabulate cause the error?
> What is wrong in this MWE?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
> *
> \startbuffer[AdjacencyList1]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \dorecurse{8}
> {\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
>
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \doloop{
> \ifnum \recurselevel=7
> \exitloop
> \fi
> \NC \recurselevel \NC \NC\NR \HL
> }
> \stoptabulate
> \stopbuffer
>
> \starttext
> \getbuffer[AdjacencyList1]
>
> \getbuffer[AdjacencyList2]
> \stoptext
>
> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성:
>
> Send ntg-context mailing list submissions to
> ntg-context@ntg.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> ntg-context-requ...@ntg.nl
>
> You can reach the person managing the list at
> ntg-context-ow...@ntg.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
>
>
> Today's Topics:
>
>   1. Parallel text support (Denis Maier)
>   2. Re: Parallel text support (Taco Hoekwater)
>   3. Re: ZapfDingbats Unicode differences MKIV vs LMTX
>  (Christoph Reller)
>   4. Re: ZapfDingbats Unicode differences MKIV vs LMTX (Hans Hagen)
>   5. Math fonts for Nimbus fonts (Otared Kavian)
>   6. Re: 2020 Meeting recordings? (Taco Hoekwater)
>
>
> --
>
> Message: 1
> Date: Mon, 21 Sep 2020 12:21:37 +0200
> From: Denis Maier 
> To: ntg-context@ntg.nl
> Subject: [NTG-context] Parallel text support
> Message-ID: <780fe43c-f2c3-6ea1-04f5-d4d5c22e7...@mailbox.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> Hi,
>
> I'm trying to typeset a parallel text that should appear in columns. The
> sources are XML, and there I have to use tables for this. So, I thought
> the easiest way is to use extreme tables for this:
>
> =
> \starttext
>
> \dorecurse{3}{\input knuth}
>
> \startxtable[split=yes,frame=off]
> \startxrow
> \startxcell Text \stopxcell
> \startxcell Übersetzung \stopxcell
> \stopxrow
> \startxrow
> \startxcell \input ward \stopxcell
> \startxcell \input tufte \stopxcell
> \stopxrow
> \stopxtable
>
> \stoptext
> =
>
> However, as it turns out, split only seems to mean that the table is
> split between rows, individual rows stay on the same page.
>
> Is there a better approach? I've found the page-streams, but that seems
> to be too much...
>
> Best,
> Denis
>
>
> --
>
> Message: 2
> Date: Mon, 21 Sep 2020 13:58:11 +0200
> From: Taco Hoekwater 
> To: mailing list for ConTeXt users 
> Subject: Re: [NTG-context] Parallel text support
> Message-ID: 
> Content-Type: text/plain; charset=utf-8
>
>
>
> On 21 Sep 2020, at 12:21, Denis Maier 
> wrote:
>
>
> However, as it turns out, split only seems to mean that the table is split
> between rows, individual rows stay on the same page.
>
> Is there a better approach? I've found the page-streams, but that seems to
> be too much…
>
>
> \starttabulate
>
>
>
> --
>
> Message: 3
> Date: Mon, 21 Sep 2020 14:55:02 +0200
> From: Christoph Reller 
> To: Hans Hagen 
> Cc: mailing list for ConTeXt users 
> Subject: Re: [NTG-context] ZapfDingbats Unicode differences MKIV vs
> LMTX
> Message-ID:
> 
> Content-Type: text/plain; charset="utf-8"
>
> On Sat, Sep 19, 2020 at 12:04 PM Hans Hagen  wrote:
>
> On 9/19/2020 6:18 AM, Christoph Reller wrote:
>
> On Fri, Sep 18, 2020 at 4:17 PM Hans Hagen  > wrote:
>
>On 9/18/2020 11:23 AM, Christoph Reller wrote:
>
> \definefontsynonym[ZapfDingbats][file:ZapfDingbats][features=dingbats]
>
> \usemodule [fnt-10]
> \starttext
> (1) \getglyphdirect{ZapfDingbats}{61491}\crlf % MKIV log: char 
> (U+0F033) in font 'ZapfDingbats-4' with id 8: missing
> (2) \getglyphdirect{ZapfDingbats}{983059} % LMTX log: char 
> (U+F0013) in font 'ZapfDingbats-4' with id 8: missing
> \ShowCompleteFont{name:ZapfDingbats}{14pt}{1}
> \stoptext
>
>Dingbats are old school t1 without proper names so we can't use
>unicodes. However, there is a goodie that should do that so that in
>principle it should work with unicodes but there is 

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 example.
> 
> Does the tabulate cause the error?
> What is wrong in this MWE?

\dorecurse does not expand its arguments. See this old blog post for a 
discussion on this:

https://adityam.github.io/context-blog/post/tex-programming/

Aditya
___
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
___


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' snippet.

Oh yes… sorry, I am ashamed :-(
I just put the code sent by Hans below your’s, and then commented out your 
code, including the definition of layers and backgounds…

Indeed everything works as expected with a buffer.

Best regards: OK
___
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
___

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 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 me what I am doing wrong with this, if
anything, and how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37
MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.)

This has nothing to do with \dorecurse, but due to the fact that the
argument of \dorecurse or any macro is parsed before the catcode changes
introduced by \startlines come into effect. Here is a simpler example
demonstrating similar behavior:

\def\test#1{#1}

\starttext
\test{Something
\startlines
Line one
Line two
\stoplines}
\stoptext

Depending on what you want to do, it should be possible to come up with
a workaround.

\startbuffer
  \startstandardmakeup
\setlayerframed
  [blocks]
  [preset=lefttop,
   frame=off,
   align=right]{
  \startlines
Line one on the left
Line two on the left
  \stoplines
}
\setlayerframed
  [blocks]
  [preset=righttop,
   frame=off,
   align=flushright]{
  \startlines
thgir eht no eno eniL
thgir eht no owt eniL
  \stoplines
}
  \stopstandardmakeup
\stopbuffer

\dorecurse{1}{
\getbuffer
}


___


Hans and Aditya,

Thank you for the explanation and the workaround.

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' snippet.


---
Rik

___
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
___

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 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 what I am doing wrong with this, if
>>> anything, and how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37
>>> MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.)
>> 
>> This has nothing to do with \dorecurse, but due to the fact that the
>> argument of \dorecurse or any macro is parsed before the catcode changes
>> introduced by \startlines come into effect. Here is a simpler example
>> demonstrating similar behavior:
>> 
>> \def\test#1{#1}
>> 
>> \starttext
>> \test{Something
>> \startlines
>> Line one
>> Line two
>> \stoplines}
>> \stoptext
>> 
>> Depending on what you want to do, it should be possible to come up with
>> a workaround.
> 
> \startbuffer
>  \startstandardmakeup
>\setlayerframed
>  [blocks]
>  [preset=lefttop,
>   frame=off,
>   align=right]{
>  \startlines
>Line one on the left
>Line two on the left
>  \stoplines
>}
>\setlayerframed
>  [blocks]
>  [preset=righttop,
>   frame=off,
>   align=flushright]{
>  \startlines
>thgir eht no eno eniL
>thgir eht no owt eniL
>  \stoplines
>}
>  \stopstandardmakeup
> \stopbuffer
> 
>\dorecurse{1}{
>\getbuffer
>}
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> 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
> ___

___
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
___

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 they should,
separately. Please tell me what I am doing wrong with this, if
anything, and how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37
MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.)


This has nothing to do with \dorecurse, but due to the fact that the
argument of \dorecurse or any macro is parsed before the catcode changes
introduced by \startlines come into effect. Here is a simpler example
demonstrating similar behavior:

\def\test#1{#1}

\starttext
\test{Something
\startlines
Line one
Line two
\stoplines}
\stoptext

Depending on what you want to do, it should be possible to come up with
a workaround.


\startbuffer
  \startstandardmakeup
\setlayerframed
  [blocks]
  [preset=lefttop,
   frame=off,
   align=right]{
  \startlines
Line one on the left
Line two on the left
  \stoplines
}
\setlayerframed
  [blocks]
  [preset=righttop,
   frame=off,
   align=flushright]{
  \startlines
thgir eht no eno eniL
thgir eht no owt eniL
  \stoplines
}
  \stopstandardmakeup
\stopbuffer

\dorecurse{1}{
\getbuffer
}

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
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
___

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 what I am doing wrong with this, if anything, 
and how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37 MKIV beta 
fmt: 2017.1.19 on Win10 x64. There are no errors in the log.)


This has nothing to do with \dorecurse, but due to the fact that the 
argument of \dorecurse or any macro is parsed before the catcode changes 
introduced by \startlines come into effect. Here is a simpler example 
demonstrating similar behavior:


\def\test#1{#1}

\starttext
\test{Something
\startlines
Line one
Line two
\stoplines}
\stoptext

Depending on what you want to do, it should be possible to come up with a 
workaround.


Aditya

___
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
___

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 the framed layer are typeset ten times on the 
same line, as if the command \startlines were not there.

Best regards: OK

> On 20 Jan 2017, at 04:34, 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 what I am doing wrong with this, if anything, and 
> how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37 MKIV beta  fmt: 
> 2017.1.19 on Win10 x64. There are no errors in the log.)
> 
>   \definelayer
> [blocks]
> [width=\textwidth,
>  height=\textheight]
> 
>   \setupbackgrounds
> [page]
> [background=blocks]
> 
>   \starttext
> \dorecurse{1}{  % comment to clear error
>   \startstandardmakeup
> \setlayerframed
>   [blocks]
>   [preset=lefttop,
>frame=off,
>align=right]{
>   \startlines
> Line one on the left
> Line two on the left
>   \stoplines
> }
> \setlayerframed
>   [blocks]
>   [preset=righttop,
>frame=off,
>align=flushright]{
>   \startlines
> thgir eht no eno eniL
> thgir eht no owt eniL
>   \stoplines
> }
>   \stopstandardmakeup
> }   % comment to clear error
>   \stoptext
> 
> -- 
> Rik

___
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
___