Hi Lars,
The task template apparently applies the attribute-set named
'formal.object.properties' to task, and that attribute-set has a
keep-together.within-column="always" attribute. With your three tall images
that prevent the task from fitting on one page, FOP fails to handle such a
large keep.
The solution for this task is to add a processing instruction:
<task>
<?dbfo keep-together="auto"?>
If you want to globally turn off the keep for all tasks, then your
customization layer should have:
<xsl:attribute-set name="formal.object.properties">
<xsl:attribute name="keep-together.within-column">
<xsl:choose>
<xsl:when test="self::task">auto</xsl:when>
<xsl:othewise>always</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:attribute-set>
Personally I think task should have its own attribute-set to make such
customizations easier for tasks.
Bob Stayton
Sagehill Enterprises
[email protected]
----- Original Message -----
From: Lars Vogel
To: DocBook Apps
Sent: Saturday, October 08, 2011 4:44 PM
Subject: [docbook-apps] imageobject in task leads to strange result in pdf
Hello,
I'm trying to utilize the <task> element. But if I add imageobjects the pdf
result looks broken.
The example document I use is listed below and the rendering result is
attached.
Any advice what I'm doing wrong? The input document validates in Eclipse.
Best regards, Lars
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"../docbook-xml-4.5/docbookx.dtd">
<article>
<section label="1.0">
<title>An introduction to DocBook</title>
<task>
<title>Test</title>
<taskprerequisites>
<title> Prerequisites</title>
<para> You have installed and started the Eclipse RCP development
environment.
</para>
</taskprerequisites>
<procedure>
<title> Test</title>
<step>
<para>Press "Next" and make the following settings. As we are
going
to
develop an RCP application, select "Yes" at the question
"Would
you
like to create a rich client application".
</para>
<para>
<mediaobject>
<imageobject>
<imagedata scale="60" fileref="images/training_firstrcp20.png"/>
</imageobject>
<textobject>
<phrase>Second page of the Eclipse Plug-in Wizard specifying the
plug-in ID, version, Name, Activator and the RCP type.
</phrase>
</textobject>
</mediaobject>
</para>
<para>
Press next and select the template
"Hello RCP".
</para>
<para>
<mediaobject>
<imageobject>
<imagedata scale="60" fileref="images/training_firstrcp30.png"/>
</imageobject>
<textobject>
<phrase>Third page of the Eclipse Plug-in Wizard selecting the
template "Hello RCP".
</phrase>
</textobject>
</mediaobject>
</para>
<para> Press next and select "Add branding" and press Finish.
</para>
<para>
<mediaobject>
<imageobject>
<imagedata scale="60" fileref="images/training_firstrcp40.png"/>
</imageobject>
<textobject>
<phrase>Forth page of the Eclipse Plug-in Wizard specifying the
branding.
</phrase>
</textobject>
</mediaobject>
</para>
</step>
</procedure>
</task>
</section>
</article>
--
Lars
http://www.vogella.de - Eclipse, Android and Java Tutorials
http://www.twitter.com/vogella - Lars on Twitter
------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]