Re: [NTG-context] Different text versions in columns?

2016-11-27 Thread Henning Hraban Ramm
Am 2016-11-27 um 14:13 schrieb Wolfgang Schuster :

> Yes, you can use it to create paragraphs of equal height in different streams.
>>> Only the mechanism to create pages/columns for the stream content is
>>> missing.
> You can save text and flush it afterwards but there is no command which
> places the content side by side (or in columns). Below is a simple example
> but I had to write the splitter myself.

Thank you, I wikified your examples.
http://wiki.contextgarden.net/Columns#Examples_of_MkIV_streams

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Different text versions in columns?

2016-11-27 Thread Jean-Pierre Delange
Hi Wolfgang,

Thank you very much to clarify the use of \pushoutputstream.
I'm going to work with your two examples, in order to elaborate a sample of 
parallel texts in two different language on alternate pages...
JP

- Mail original -
De: "Wolfgang Schuster" <schuster.wolfg...@gmail.com>
À: "Mailing list for ConTeXt users" <ntg-context@ntg.nl>
Envoyé: Dimanche 27 Novembre 2016 14:13:57
Objet: Re: [NTG-context] Different text versions in columns?

> Arthur Reutenauer <mailto:arthur.reutena...@normalesup.org>
> 26. November 2016 um 00:14
>> 1. Streams work in MkIV
>> 2. The MkIV version has a command to set sync points.
>
>That’s \pushoutputstreams, I presume.
Yes, you can use it to create paragraphs of equal height in different 
streams.

\setupbodyfont[tt]

\starttext

\startoutputstream[one]
 \setupalign[flushleft]
 \dorecurse{3}{Line \recurselevel\par}\pushoutputstream
 \blank
 \dorecurse{6}{Line \recurselevel\par}\pushoutputstream
 \blank
 \dorecurse{4}{Line \recurselevel\par}\pushoutputstream
\stopoutputstream

\startoutputstream[two]
 \setupalign[flushright]
 \dorecurse{5}{Line \recurselevel\par}\pushoutputstream
 \blank
 \dorecurse{2}{Line \recurselevel\par}\pushoutputstream
 \blank
 \dorecurse{7}{Line \recurselevel\par}\pushoutputstream
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
 {\outputstreambox[one]}
 {\raise2\strutdp\outputstreambox[two]}
\stopoverlay

\stoptext

>> Only the mechanism to create pages/columns for the stream content is
>> missing.
>
>Can you elaborate a bit?  I’m having the following use case in mind:
> exactly two streams, one on even-numbered pages, the other on the
> odd-numbered ones, with infrequent synchronisations.  The two streams
> could run in parallel, facing each other on the spread, and only be
> resynchronised every 5 or 10 pages, say.  Is that currently not
> possible?
You can save text and flush it afterwards but there is no command which
places the content side by side (or in columns). Below is a simple example
but I had to write the splitter myself.

\starttext

\startoutputstream[one]
 \startcolor[red]
 \dorecurse{10}{\input knuth\par}
 \stopcolor
\stopoutputstream

\startoutputstream[two]
 \startcolor[green]
 \dorecurse{10}{\input zapf\par}
 \stopcolor
\stopoutputstream

\synchronizestreams[one,two]

\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]

\doloop
   {\ifvoid\scratchboxone
  \exitloop
\else
  \setbox\scratchboxfour\vsplit\scratchboxone to \textheight
  \vbox to \vsize{\box\scratchboxfour\vss}%
  \setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight
  \vbox to \vsize{\box\scratchboxfive\vss}%
\fi}

\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
___
___
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] Different text versions in columns?

2016-11-27 Thread Wolfgang Schuster

Arthur Reutenauer 
26. November 2016 um 00:14

1. Streams work in MkIV
2. The MkIV version has a command to set sync points.


   That’s \pushoutputstreams, I presume.
Yes, you can use it to create paragraphs of equal height in different 
streams.


\setupbodyfont[tt]

\starttext

\startoutputstream[one]
\setupalign[flushleft]
\dorecurse{3}{Line \recurselevel\par}\pushoutputstream
\blank
\dorecurse{6}{Line \recurselevel\par}\pushoutputstream
\blank
\dorecurse{4}{Line \recurselevel\par}\pushoutputstream
\stopoutputstream

\startoutputstream[two]
\setupalign[flushright]
\dorecurse{5}{Line \recurselevel\par}\pushoutputstream
\blank
\dorecurse{2}{Line \recurselevel\par}\pushoutputstream
\blank
\dorecurse{7}{Line \recurselevel\par}\pushoutputstream
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
{\outputstreambox[one]}
{\raise2\strutdp\outputstreambox[two]}
\stopoverlay

\stoptext


Only the mechanism to create pages/columns for the stream content is
missing.


   Can you elaborate a bit?  I’m having the following use case in mind:
exactly two streams, one on even-numbered pages, the other on the
odd-numbered ones, with infrequent synchronisations.  The two streams
could run in parallel, facing each other on the spread, and only be
resynchronised every 5 or 10 pages, say.  Is that currently not
possible?

You can save text and flush it afterwards but there is no command which
places the content side by side (or in columns). Below is a simple example
but I had to write the splitter myself.

\starttext

\startoutputstream[one]
\startcolor[red]
\dorecurse{10}{\input knuth\par}
\stopcolor
\stopoutputstream

\startoutputstream[two]
\startcolor[green]
\dorecurse{10}{\input zapf\par}
\stopcolor
\stopoutputstream

\synchronizestreams[one,two]

\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]

\doloop
  {\ifvoid\scratchboxone
 \exitloop
   \else
 \setbox\scratchboxfour\vsplit\scratchboxone to \textheight
 \vbox to \vsize{\box\scratchboxfour\vss}%
 \setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight
 \vbox to \vsize{\box\scratchboxfive\vss}%
   \fi}

\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] Different text versions in columns?

2016-11-25 Thread Arthur Reutenauer
> 1. Streams work in MkIV
> 2. The MkIV version has a command to set sync points.

  That’s \pushoutputstreams, I presume.

> Only the mechanism to create pages/columns for the stream content is
> missing.

  Can you elaborate a bit?  I’m having the following use case in mind:
exactly two streams, one on even-numbered pages, the other on the
odd-numbered ones, with infrequent synchronisations.  The two streams
could run in parallel, facing each other on the spread, and only be
resynchronised every 5 or 10 pages, say.  Is that currently not
possible?

Best,

Arthur
___
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] Different text versions in columns?

2016-11-24 Thread Wolfgang Schuster

Henning Hraban Ramm 
24. November 2016 um 21:13

Thank you.
I recognized what’s really demanding in my case:
I need numbered headers in two versions.
E.g.

Current bylaws | Proposed changes
|
§1 Preamble | §1 Preamble
1. Bla | 1. Bla
2. Foo | 2. Bar
3. Baz | 3. Baz
|
§2 Something | §2 Something different
|
| §2a Something new
|
§3 Further | §3 Further
|
... | ...

Any ideas how I can achieve that? Should I better forget about 
automatical numbering?

With a few small changes in the section mechanism this is very easy.

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] Different text versions in columns?

2016-11-24 Thread Henning Hraban Ramm
Am 2016-11-22 um 23:01 schrieb Wolfgang Schuster :

>> Henning Hraban Ramm 22. November 2016 um 21:42
>> Hi, this is related to the current thread about TwoColumns, but different:
>> 
>> For changes in bylaws or similar legal texts, I need to typeset the old and 
>> new version side by side, while paragraphs should start at the same height, 
>> different lengths of paragraphs to be balanced with whitespace. I’d like to 
>> have both versions on one page (i.e. in columns).
>> 
>> That means, the streams module is not suitable, if it would work in MkIV at 
>> all.
>> Is there a better solution than using a table? (And which one is best?)
> 1. Streams work in MkIV
> 2. The MkIV version has a command to set sync points.
> 
> Only the mechanism to create pages/columns for the stream content is missing.

Thank you.
I recognized what’s really demanding in my case:
I need numbered headers in two versions.
E.g.

Current bylaws   | Proposed changes
 |
§1 Preamble  | §1 Preamble
1. Bla   | 1. Bla
2. Foo   | 2. Bar
3. Baz   | 3. Baz
 |
§2 Something | §2 Something different
 |
 | §2a Something new
 |
§3 Further   | §3 Further
 |
...  | ...

Any ideas how I can achieve that? Should I better forget about automatical 
numbering?



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Different text versions in columns?

2016-11-22 Thread Wolfgang Schuster

Henning Hraban Ramm 
22. November 2016 um 21:42
Hi, this is related to the current thread about TwoColumns, but different:

For changes in bylaws or similar legal texts, I need to typeset the 
old and new version side by side, while paragraphs should start at the 
same height, different lengths of paragraphs to be balanced with 
whitespace. I’d like to have both versions on one page (i.e. in columns).


That means, the streams module is not suitable, if it would work in 
MkIV at all.

Is there a better solution than using a table? (And which one is best?)

1. Streams work in MkIV
2. The MkIV version has a command to set sync points.

Only the mechanism to create pages/columns for the stream content is 
missing.


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
___

[NTG-context] Different text versions in columns?

2016-11-22 Thread Henning Hraban Ramm
Hi, this is related to the current thread about TwoColumns, but different:

For changes in bylaws or similar legal texts, I need to typeset the old and new 
version side by side, while paragraphs should start at the same height, 
different lengths of paragraphs to be balanced with whitespace. I’d like to 
have both versions on one page (i.e. in columns).

That means, the streams module is not suitable, if it would work in MkIV at all.
Is there a better solution than using a table? (And which one is best?)

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

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