[dev-context] Streams: compensation not happening correctly.

Sietse Brouwer sbbrouwer at gmail.com
Sat May 12 23:31:43 CEST 2012


Hi all,

I was trying to work out the streams mechanism, and found the
following bug (I call my streams [left] and [right]):

* An unwanted extra compensating line is inserted after the first
block of the [left] stream that is as tall as, or shorter than, its
corresponding block in the [right] stream.
* If that extra line has not yet been inserted, then when two blocks
have the same height the one on the [left] is wrongly measured as
being shorter. (For a single line containing a capital A, it's 561512
vs 932551.)
* This happens only once: subsequent identical-content blocks will
indeed have identical heights.

This is just a bug report; for me, at least, a fix is not required.
Minimal example and relevant bit from its output log below.

Cheers,

Sietse
Sietse Brouwer

---- minimal example ----

\enabletrackers[streams.flushing]

\setuplayout[grid=yes]
\showgrid

\starttext
\enableoutputstream[left]
    A
    %\input ward
    \par \pushoutputstream
    % Unwanted compensating line inserted here
    B \par \pushoutputstream
    % If the Ward paragraph is enabled, the extra line is inserted
here, instead.
    C \par \pushoutputstream
\enableoutputstream[right]
    A \par \pushoutputstream
    B \par \pushoutputstream
    C \par \pushoutputstream
\disableoutputstream

\synchronizestreams[left,right]

\page \flushoutputstream[left]
\page \flushoutputstream[right]
\stoptext


-------- excerpt from output log -----------

streams         > synchronizing list: left right
streams         > maximum number of slots: 4
streams         > slot 1 of 'left' is packed to height 561512 and depth 0
streams         > slot 1 of 'right' is packed to height 932551 and depth 0
streams         > slot 1 has max height 932551 and max depth 0
streams         > slot 1:1 with delta (371039,0) is compensated by 1 lines
streams         > slot 2 of 'left' is packed to height 949066 and depth 0
streams         > slot 2 of 'right' is packed to height 949066 and depth 0
streams         > slot 2 has max height 949066 and max depth 0
streams         > slot 3 of 'left' is packed to height 949066 and depth 16515
streams         > slot 3 of 'right' is packed to height 949066 and depth 16515
streams         > slot 3 has max height 949066 and max depth 16515
streams         > slot 4 has max height 0 and max depth 0
streams         > flushing 4 slots of 'left'
backend         > xmp > using file
'/opt/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1
streams         > flushing 4 slots of 'right'
pages           > flushing realpage 2, userpage 2


More information about the dev-context mailing list