[publican-list] How to avoid unwanted whitespace with <indexterm>

Erich Steinböck erich.steinboeck at gmail.com
Sun Nov 15 14:31:24 UTC 2015


I'm working on existing documentation with heavy indexing.  The way that
<indexterm> is coded will very often lead to unwanted whitespace (blank
lines).

I've read a lot about how to correctly index with Docbook/Publican, but I'm
still unable to find an acceptable solution.

Existing XML, which typically looks like this, will show up with an
additional blank line between the section header and the included diagram.

~~~~
<section id="mthXxxx"><title>method</title>
<indexterm><primary>method</primary>
<secondary>of Class</secondary></indexterm>
<indexterm><primary>method</primary>
<secondary>method</secondary>
<tertiary>of Class</tertiary></indexterm>

<mediaobject>
<imageobject>
<imagedata fileref=".." />
</imageobject>
</mediaobject>

<para>Returns ..
~~~~

Moving the <indexterm> into the <title> (as shown below) will remove the
blank line, but any <xref> links to this id will show up with a glaring
trailing blank, even if I carefully orchestrate <indexterm> and <indexterm>.
~~~~
<section id="mthXxxx"><title>method<indexterm>
<primary>method</primary>
<secondary>of Class</secondary>
</indexterm><indexterm>
<primary>method</primary>
<secondary>method</secondary>
<tertiary>of Class</tertiary>
</indexterm></title>
~~~~

Moving the <indexterm> into the following paragraph isn't a nice option
either, as any <xref> links should really point to the heading, not
(depending on the diagram size) maybe much further down.

As I'm having the same issue with indexed examples without titles, where I
cannot see *any *possibility to move the <indexterm> to, I'm wondering if
Publican could be instructed to simply ignore whitespace that gets
introduced with <indexterm>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/publican-list/attachments/20151115/ba1bff46/attachment.htm>


More information about the publican-list mailing list