Page 1 of 1

Keep <title> and <image> together in <fig> element

Posted: Tue Nov 15, 2016 11:54 pm
by BobbyG66
I have a Concept with a large number of images with titles.
When these break on the pages, the titles are widowed and the images orphaned.
Have tried a number of ways to "keep-with-next" type options in the

Code: Select all

plugin/cfg/fo/attrs/commons-attr.xsl
file.
The issue I see is that the <title> and <image> attribute are separate in the <fig> tag.
Any ideas?
Here is the code layout:
[Codebox=]<fig>
<title>Title</title>
<image href="/Content/Label.png">
</fig>[/Codebox]

Thanks
BG66

Re: Keep <title> and <image> together in <fig> element

Posted: Wed Nov 16, 2016 12:14 pm
by Dan
Hello,

Try using: page-break-inside="avoid" on the fig element.

Regards,
Dan

Re: Keep <title> and <image> together in <fig> element

Posted: Wed Nov 16, 2016 3:06 pm
by BobbyG66
Thanks Dan,

Was not aware of that attribute.
I tried that and it didn't work.

BG66

Re: Keep <title> and <image> together in <fig> element

Posted: Fri Nov 18, 2016 12:27 pm
by Dan
Please read the topic topic12552.html, it is the same problem, but it refers to tables.
I think you could use:

Code: Select all


<xsl:attribute-set name="fig" .......... >
<xsl:attribute name="keep-together.within-page">1</xsl:attribute>
</xsl:attribute-set>