3
私はdocbookのドキュメントを持っています.PDFを作成すると、その前に "Chapter"という単語を付けずに章のタイトルを表示します。 thisに応じて、以下の作業をする必要があります:docbookの章のタイトルで "chapter"という単語を削除する方法
マイカスタムスタイルシート:(doc.xsl)
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:import
href="/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/fo/docbook.xsl"/>
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:l18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="en">
<l:context name="title-numbered">
<l:template name="chapter" text="%n. %t"/>
</l:context>
</l:l10n>
</l:l18n>
</xsl:stylesheet>
私は、この文書を使用する場合:(doc.xml)
<book xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en">
<title>Doc</title>
<chapter>
<title>Introduction</title>
<section>
<title>Purpose of the document</title>
<para></para>
</section>
</chapter>
</book>
と、これらのコマンドを:
xsltproc doc.xsl doc.xml > doc.fo
fop -fo doc.fo -pdf fo.pdf
結果のPDFにはまだ「章「はじめに」という章の前に「1」と書かれています。
「タイトル」のような異なるコンテキスト名を試しましたが、動作しません。 何が間違っているのですか?またはこの問題をどのようにデバッグできますか?
更新 この問題が見つかりました。行l:l18n
はl:i18n
...
をお読みくださいコンテキストタイトル番号がtocと一致していないように見えるので、章のエントリ。 tocエントリの正しいコンテキストは何ですか? – ceving