[xep-support] Re: Issue with change bars and external graphics

Michael Sulyaev msulyaev at renderx.com
Wed Mar 21 18:23:34 PDT 2012


On 03/21/2012 11:22 AM, Patricia Piolon wrote:
> With the following fo I get a change bar in pdf that is only 1 line
> high, even though the graphic is much higher. Is this normal behaviour?

Hi Patricia,

I believe this is normal. Imagine you had just one short word changed 
and surrounded with change-bar-begin and change-bar-end, in the middle 
of the line. When rendered, both virtual points for the Begin and the 
End are on the same position vertically - at the baseline of that word. 
So, you see 1 line tall change bar actually because XEP has special 
treatment for this case: as if the Start was at baseline plus 
font-size*1.2 (iirc).

Now, if you consider a tall image instead of that word - nothing 
changes, the bar is still just 1 line-height tall, and it does not mark 
the whole image (which is an inline-mode element, like fo:character).


> I know I can fix it by wrapping the graphic in a block and
> starting/ending the change bars before/after the block, but then it's
> possible for the block to start on page 1 while the graphic gets pushed
> to page 2 due to lack of space, resulting in a change bar on 'empty
> space' on page 1 as well as the graphic itself on page 2. This is highly
> undesirable.

I understand your intention. Apparently, you assume that a matched pair 
of change-bar-begin and change-bar-end atomic elements tends to shrink 
in order to produce a change bar as short as possible, marking all 
that's between. But actually this is not the case. Change bar points are 
completely transparent for the core algorithms.

To get the desired layout, indeed, you would need to wrap the graphics 
in a block, surround with the change-bar points, and place altogether in 
yet another block or a block-container with 
keep-together.within-column="always". This is likely to prevent bars on 
empty space near page break.

Regards,
Mike



More information about the Xep-support mailing list