ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Different text versions in columns?
@ 2016-11-22 20:42 Henning Hraban Ramm
  2016-11-22 22:01 ` Wolfgang Schuster
  0 siblings, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm @ 2016-11-22 20:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-22 20:42 Different text versions in columns? Henning Hraban Ramm
@ 2016-11-22 22:01 ` Wolfgang Schuster
  2016-11-24 20:13   ` Henning Hraban Ramm
  2016-11-25 23:14   ` Arthur Reutenauer
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2016-11-22 22:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 775 bytes --]

> Henning Hraban Ramm <mailto:texml@fiee.net>
> 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

[-- Attachment #1.2: Type: text/html, Size: 1767 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-22 22:01 ` Wolfgang Schuster
@ 2016-11-24 20:13   ` Henning Hraban Ramm
  2016-11-24 23:19     ` Wolfgang Schuster
  2016-11-25 23:14   ` Arthur Reutenauer
  1 sibling, 1 reply; 8+ messages in thread
From: Henning Hraban Ramm @ 2016-11-24 20:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2016-11-22 um 23:01 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-24 20:13   ` Henning Hraban Ramm
@ 2016-11-24 23:19     ` Wolfgang Schuster
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2016-11-24 23:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 612 bytes --]

> Henning Hraban Ramm <mailto:texml@fiee.net>
> 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

[-- Attachment #1.2: Type: text/html, Size: 1789 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-22 22:01 ` Wolfgang Schuster
  2016-11-24 20:13   ` Henning Hraban Ramm
@ 2016-11-25 23:14   ` Arthur Reutenauer
  2016-11-27 13:13     ` Wolfgang Schuster
  1 sibling, 1 reply; 8+ messages in thread
From: Arthur Reutenauer @ 2016-11-25 23:14 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-25 23:14   ` Arthur Reutenauer
@ 2016-11-27 13:13     ` Wolfgang Schuster
  2016-11-27 17:28       ` Jean-Pierre Delange
  2016-11-27 17:44       ` Henning Hraban Ramm
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfgang Schuster @ 2016-11-27 13:13 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

> Arthur Reutenauer <mailto:arthur.reutenauer@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-27 13:13     ` Wolfgang Schuster
@ 2016-11-27 17:28       ` Jean-Pierre Delange
  2016-11-27 17:44       ` Henning Hraban Ramm
  1 sibling, 0 replies; 8+ messages in thread
From: Jean-Pierre Delange @ 2016-11-27 17:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.wolfgang@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.reutenauer@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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Different text versions in columns?
  2016-11-27 13:13     ` Wolfgang Schuster
  2016-11-27 17:28       ` Jean-Pierre Delange
@ 2016-11-27 17:44       ` Henning Hraban Ramm
  1 sibling, 0 replies; 8+ messages in thread
From: Henning Hraban Ramm @ 2016-11-27 17:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2016-11-27 um 14:13 schrieb Wolfgang Schuster <schuster.wolfgang@gmail.com>:

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-27 17:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 20:42 Different text versions in columns? Henning Hraban Ramm
2016-11-22 22:01 ` Wolfgang Schuster
2016-11-24 20:13   ` Henning Hraban Ramm
2016-11-24 23:19     ` Wolfgang Schuster
2016-11-25 23:14   ` Arthur Reutenauer
2016-11-27 13:13     ` Wolfgang Schuster
2016-11-27 17:28       ` Jean-Pierre Delange
2016-11-27 17:44       ` Henning Hraban Ramm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).