Subject: Re: [xsl] How to suppress vertical whitespace from <indexterm> From: "Dave Pawson dave.pawson@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Mar 2018 08:08:09 -0000 |
Better answers at https://docbook.org/guidelines HTH On 15 March 2018 at 23:14, Jeffrey Walton noloader@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Everyone, > > I have a DocBook v4.5 book at > https://github.com/noloader/POWER8-crypto . I am use Ubuntu 16.04 > with: > > $ xsltproc --version > Using libxml 20903, libxslt 10128 and libexslt 817 > xsltproc was compiled against libxml 20903, libxslt 10128 and libexslt 817 > libxslt 10128 was compiled against libxml 20903 > libexslt 817 was compiled against libxml 20903 > > I use this pattern shown below to generate index entries. > (https://github.com/noloader/POWER8-crypto/blob/master/power8-crypto/ch01.xml#L45) > . > > The problem is, the <indexterm> creates extra vertical whitespace > wherever it is present. For example, ch01.xml#L45 (link above) has: > > The book makes frequent references to... <end of paragraph>. > <indexterm> > <indexterm> > <indexterm> > Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>. > > And it produces: > > The book makes frequent references to... <end of paragraph>. > <whitespace> > <whitespace> > <whitespace> > Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>. > > I understand there is space between paragraphs, and I expect "normal" > spacing as if the <indexterm> were not present: > > The book makes frequent references to... <end of paragraph>. > <whitespace> > Both POWER8 machines are IBM POWER System S822 ... <end of paragraph>. > > I am using this script to build the book: > https://github.com/noloader/POWER8-crypto/blob/master/power8-crypto/make-book.sh > . It is pretty boring and just calls: > > XSL=/usr/share/xml/docbook/stylesheet/docbook-xsl/fo/docbook.xsl > xsltproc --xinclude "$XSL" book.xml > power8-crypto.fo > > My question is, how can I collapse the extra wheitespace into a single > whitespace? > > I'm happy to use an xsltproc option to clooapse the whitespace. I am > also happy to use sed or awk to remove them. > > Thank you in advance. And my apologies for the long post. > > **************************************** > > Here is a typical application of the <indexterm> pattern. > > <para>The book makes frequent references to > <systemitem>gcc112</systemitem> and <systemitem>gcc119</systemitem> > from the GCC Compile Farm...</para> > <indexterm> > <primary>Compile farm</primary> > <secondary>gcc112</secondary> > </indexterm> > <indexterm> > <primary>Compile farm</primary> > <secondary>gcc119</secondary> > </indexterm> > <indexterm> > <primary>Compile farm</primary> > <secondary>POWER8</secondary> > </indexterm> > <para>Both POWER8 machines are IBM POWER System S822 with two CPU > cards...</para> > -- Dave Pawson XSLT XSL-FO FAQ. Docbook FAQ.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] How to suppress vertical whit, Jeffrey Walton noloa | Thread | [xsl] xmllint and paragraph line wi, Jeffrey Walton noloa |
[xsl] How to suppress vertical whit, Jeffrey Walton noloa | Date | Re: [xsl] Kernow and SaxonPE, Andrew Welch andrew. |
Month |