OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Problem customizing appendix title (for PDF)


Hi all,

I want the label of an appendix in an article to show up in a final PDF
as follows:

Bijlage 1. SomeDutchTitle

(The word "Bijlage" is Dutch for "Appendix".)

So the text "Bijlage" is to be prepended to the appendix number.

Chapter 9 of the book "Docbook XSL, The complete
Guide", pages 105 and 106, covers this customization. Or online:

  http://www.sagehill.net/docbookxsl/CustomGentext.html

It reads:

<l:context name="title">
  <l:template name="appendix" text="Appendix %n. %t"/>
  ...

Below, you find a minimal docbook xml source. Also a minimal docbook xsl
file, analogous to the above customization in English, which I applied
using xsltproc. Finally, I used fop to generate
the final PDF (which seems to me irrelevant to the issue).

I fail to produce output that has *any* text prepended to the appendix's
number (i.e. even regardless the Dutch language).

Does anybody see what I'm doing wrong?

Thanks in advance for any insight,

Erik Leunissen
--

# Docbook XML source
<?xml version="1.0" encoding="UTF-8"?>
<article version="5.0" xmlns="http://docbook.org/ns/docbook";
         xmlns:xlink="http://www.w3.org/1999/xlink";
         xmlns:xi="http://www.w3.org/2001/XInclude";
         xmlns:svg="http://www.w3.org/2000/svg";
         xmlns:m="http://www.w3.org/1998/Math/MathML";
         xmlns:html="http://www.w3.org/1999/xhtml";
         xmlns:db="http://docbook.org/ns/docbook";>
  <info>
    <title>MyArticle</title>

    <author>

<personname><firstname>Erik</firstname><surname>Leunissen</surname></personname>

      <affiliation>
        <orgname/>
      </affiliation>
    </author>

    <pubdate/>
  </info>

  <section>
    <title>MySection</title>

    <para>Some section text.</para>
  </section>

  <appendix>
    <title>My appendix</title>

    <para/>
  </appendix>
</article>

--
# Docbook XSL
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
				xmlns:fo="http://www.w3.org/1999/XSL/Format";
				xmlns:d="http://docbook.org/ns/docbook";
				exclude-result-prefixes="d"
				version="1.0">

<!-- base stylesheet -->
<xsl:import
href="/usr/share/xml/docbook/stylesheet/nwalsh/docbook-xsl-ns/fo/docbook.xsl"/>

<xsl:param name="appendix.autolabel" select="1"/>
<xsl:param name="l10n.gentext.language">nl</xsl:param>
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
  <l:l10n language="nl">
    <l:context name="title">
      <l:template name="appendix" text="Bijlage&#160;%n.&#160;&#160;%t"/>
    </l:context>
  </l:l10n>
</l:i18n>

</xsl:stylesheet>

--


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]