[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] customizing glossaries (as list, FO output)
Some answers below, prefaced by "BOB:".
Other answers may follow as time and research permit. ----- Original Message ----- From: Bergfrid Skaara Sent: Monday, July 20, 2009 1:47 AM
Subject: [docbook-apps] customizing glossaries (as list, FO output)BOB: TOC entries are generated by processing document nodes in mode="toc".
Hi, I'm having multiple customiztion problems related to glossaries in FO
output:
1. I've set the glossary.sort parameter to 1, but I would like space and
hypens to be ignored when sorting (so that you get ca, car, ca-range and not
ca, ca-range, car). I've looked at the normalize.sort.input and
normalize.sort.output gentext templates (en-US), but I can't see how
changing them will give the desired result.
2. In our standalone glossary, the root element is book, directly followed
by an info element and then the glossary itself (which has glossdivs and
xincludes from modular files). Now, the TOC contains one entry, "Glossary",
and the PDF bookmarks are "Table of Contents" and "Glossary". I would like
to replace entries saying "Glossary" with a list of glossdivs (the title is
the letters a-z), is this possible?
The default template in that mode for glossary just outputs the "Glossary"
line. Customize this template:
<xsl:template match="bibliography|glossary"
mode="toc">
so that it does xsl:apply-templates mode="toc" to its children, and then add
templates in that mode for the children. If this is too brief an explanation,
please ask for details.BOB: Customize this template from fo/glossary.xsl:
3. Some glossentries have multiple glossdefs; is it possible to
automatically enumerate the glossdefs for such entries? If yes, which
templates must be overridden?
<xsl:template match="glossentry/glossdef" mode="glossary.as.list">
and possibly also this one if you want to use a nested fo:list-block for
multiple entries:
<xsl:template match="glossentry" mode="glossary.as.list">
The match="glossentry" template must generate the fo:list-block, and the
template for each glossdef should generate each fo:list-item.BOB: Starting with 1.75.0, some attribute-sets were added to control
4. Some time ago, I posted a message about modular glossaries in which we
replace the otherterm attributes with xlink:href attributes (sorry, I can't
find the post). The suggested customization (from Bob) was for glosseealso
elements. I've since then tried to use the same pattern for glossee
elements, and ran into problems with the "See" gentext". With glosseealso,
"See also" is correctly inserted at the beginning of the line before the
links, but with glossee I do not get the "See" gentext before the link.
Which template calls the gentext in these cases?
5. Is there an easy way to override text alignment just for glossaries? I've
currently copied the template matching d:glsosdiv in mode glossary.as.list
to add text-align parameter to teh fo:list-block . It would be nice if there
were something like the attribute set for indexes: index.entry.properties.
Working with stylesheets 1.75.1
formatting of the glossary entries:
http://docbook.sourceforge.net/release/xsl/current/doc/fo/glossterm.list.properties.html
http://docbook.sourceforge.net/release/xsl/current/doc/fo/glossdef.list.properties.html
http://docbook.sourceforge.net/release/xsl/current/doc/fo/glossterm.block.properties.html
http://docbook.sourceforge.net/release/xsl/current/doc/fo/glossdef.block.properties.html
Best regards,
Bergfrid Skaara
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]