【问题标题】:Docbook: configuring the name of the toc file?Docbook:配置 toc 文件的名称?
【发布时间】:2011-07-22 21:13:57
【问题描述】:

从一个 Docbook 文档中,我应用了一个 xslt 样式表,它与 xsltproc 一起能够生成目录文件以及每章的文件。

我想知道是否有办法指定生成的 toc 文件的名称,因为我目前拥有的是 bk01-toc.html,我希望将其生成为另一个名称。

有什么想法吗?

谢谢:)

【问题讨论】:

    标签: xslt docbook


    【解决方案1】:

    这是可能的(但有点麻烦)。您需要在 chunk-common.xsl 样式表模块(DocBook XSL 的一部分)中自定义两个相当大的命名模板:

    1. ma​​ke.lots(输出TOC文件[如果设置了chunk.tocs.and.lots参数])

      这里需要自定义包含<xsl:text>-toc</xsl:text><xsl:with-param name="filename">元素。

    2. footer.navigation(在 HTML 块的页脚中生成 TOC 文件的链接)

      自定义包含<xsl:text>-toc</xsl:text><xsl:attribute name="href"> 元素。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-06
      • 1970-01-01
      • 2013-06-28
      相关资源
      最近更新 更多