Using the latter (with docbook 5 sources) gives mixed results, depending on the output format:
- With PDF output using floatstyle has just no effect
- With HTML output using floatstylein fact renders text beside an image but without any spacing. Is the spacing somehow configurable? Also if the text contains an itemizedlist then the bullets will overlap with the image left to it (a workaround is to use <figure floatstyle="right">.
Regards
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can tell you that DAPS does not do any external validation of generated FO files. So, the error message you have there really must come from FOP itself.
FO situation: Unfortunately, I can't help you much more than that. I have never used floats in FO (at least not that I remember).
HTML situation: I think you should be able to set a margin-left/margin-right using CSS on either your figure or your text to get some spacing. Having never worked with this, though, I can't really say how it's implemented. (I vaguely remember throwing out a lot of code in our customization layer that put images into tables, though. If there are tables in the output, this might become a bit more complicated.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The docbook schema used seems to be incomplete:
While the use of attribute float in <figure> is rejected, attribute floatstyle is accepted.
But this is not a crucial issue, since the floatstyle attribute may be used alternatively and is also more specific.
Regarding the spacing of text beside a float figure, I would expect that this could be achieved with a value for the widthattribute slightly bigger then contentwidthin the <imagedata> child element, like in
Unfortunately in this case the width attribute has no effect on the spacing in rendered HTML output.
On the other hand, when placing an <imageobject> inline in text, the width attribute works just fine, like in
<para>This is an
<inlinemediaobject><imageobject><imagedatafileref="icon.png"width="25"contentwidth="20"align="center"/></imageobject></inlinemediaobject>
icon.
</para>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Apache FOP since release 2.0 has support for
fo:float
.Hence placing text beside an image should be possible using
and
according to http://www.sagehill.net/docbookxsl/FigureFloats.html.
Though, using the former gives an error
when compiling with daps-2.2.
Using the latter (with docbook 5 sources) gives mixed results, depending on the output format:
- With PDF output using
floatstyle
has just no effect- With HTML output using
floatstyle
in fact renders text beside an image but without any spacing.Is the spacing somehow configurable?
Also if the text contains an
itemizedlist
then the bullets will overlap with the image left to it (a workaround is to use<figure floatstyle="right">
.Regards
Stefan
Hi Stefan,
I can tell you that DAPS does not do any external validation of generated FO files. So, the error message you have there really must come from FOP itself.
FO situation: Unfortunately, I can't help you much more than that. I have never used floats in FO (at least not that I remember).
HTML situation: I think you should be able to set a margin-left/margin-right using CSS on either your figure or your text to get some spacing. Having never worked with this, though, I can't really say how it's implemented. (I vaguely remember throwing out a lot of code in our customization layer that put images into tables, though. If there are tables in the output, this might become a bit more complicated.)
Hi Stefan,
thanks for your response!
No, it comes from the daps validation step (which employs xerces according to the log):
The docbook schema used seems to be incomplete:
While the use of attribute
float
in<figure>
is rejected, attributefloatstyle
is accepted.But this is not a crucial issue, since the
floatstyle
attribute may be used alternatively and is also more specific.Regarding the spacing of text beside a float figure, I would expect that this could be achieved with a value for the
width
attribute slightly bigger thencontentwidth
in the<imagedata>
child element, like inUnfortunately in this case the
width
attribute has no effect on the spacing in rendered HTML output.On the other hand, when placing an
<imageobject>
inline in text, thewidth
attribute works just fine, like in