Changes

Jump to navigation Jump to search
834 bytes added ,  12:30, 23 November 2016
MkIV streams
This is useful for, e.g., typesetting bilingual books: have the original on the even pages, the translation on the odd pages, and synchronize at certain points.
Hans later re-implemented that mechanism in the core. For details see [[source:mpage-streamsstr.texmkiv|streams module the source]].
The module provides a rather low-lever interface. Hans suggested some handy shortcuts:
Beware, streams don't work in columns and not very good in columnsets.
 
==Example of MkIV streams==
 
(copied from the source)
 
<texcode>
\enabletrackers[streams.flushing]
 
\setuplayout[grid=yes] \showgrid
 
\starttext
 
\input tufte
 
\startoutputstream[nl]
 
Wat doen we hier?
 
\enableoutputstream[en]
 
Are you sleeping, brother John?\footnote{xxx}
 
\dorecurse{4}{x \footnote{note \recurselevel}\input tufte \par \pushoutputstream}
 
\enableoutputstream[de]
 
Bruder Jakob, schläfst du noch?\footnote{yyy}
 
\dorecurse{4}{x \footnote{note \recurselevel}\input ward \par \pushoutputstream}
 
\disableoutputstream
 
\stopoutputstream
 
Vader Jacob, slaap je nog?\footnote{zzz}
 
\input tufte
 
\synchronizestreams[en,de,nl]
 
\page \flushoutputstream[en] \input knuth
\page \flushoutputstream[de] \input knuth
\page \flushoutputstream[nl] \input knuth
 
\stoptext
</texcode>
{{todo|We need documentation and samples for Paragraphs, Streams and Column Sets}}

Navigation menu