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"
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.
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
\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 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 ___________________________________________________________________________________