While I was writing my book in a section which has a long <itemizedlist> that spans several page, I found an annoying problem when I added an <indexterm> element inside <listitem> just before the actual content:
DocBook XML:
<listitem><indexterm><primary>Apple</primary></indexterm><simpara>Apple</simpara></listitem>
XSL-FO output:
<fo:list-item id="idm1203043756" space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em"><fo:list-item-label end-indent="label-end()"><fo:block>•</fo:block></fo:list-item-label><fo:list-item-body start-indent="body-start()"><fo:block><fo:wrapper id="idm1202167372"><!--Apple--></fo:wrapper><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">Apple</fo:block></fo:block></fo:list-item-body></fo:list-item>
PDF output:
*
Apple
You would see that the list item content (which came after <indexterm>) mis-aligned with its bullet point as if there's another invisible text line above it; which is not supposed to happen as <indexterm> element is specified not to generate any text.
A workaround in this case would be moving the problematic <indexterm> into <simpara> element next to it.
Example article file which exhibits this problem, together with the generated XSL-FO intermediate, PDF output, and HTML reference rendering are attached as misalignedbullet.zip.
This bullet alignment issue is specific to DocBook XSL/FO stylesheet; DocBook XSL/HTML worked okay (though it still cause irregular spacing between list items).
DocBook XML DTD: 4.2
DocBook XSL: 1.79.1
XSLT Processor: XSLTproc 1.1.28
XSL-FO Processor: Apache FOP 2.1
Runtime: Cygwin 1.7.28 32-bit
System: Microsoft Windows XP Professional SP3
Broken indenting in
<article>index visible in the example PDF file is now reported as bug [#1394].Related
Bugs: #1394
This issue has been transfered to Github as issue #108
https://github.com/docbook/xslt10-stylesheets/issues/108