2011-05-25 43 views
4

中刪除verso和表的列表我有DocBook XSL的自定義層的問題。我使用Apache FOP將文檔從DocBook XML轉換爲PDF。但該書包含第二頁(所謂的反面)和列表。我剛剛刪掉了verso的內容,但第二頁現在仍然空白。我現在不怎麼刪除第二個空白頁面。從DocBook文檔

(我只有一個解決方案已經發現這是很容易 - 。只需添加<xsl:template name="book.titlepage.verso"/>到你的模板,但這種元素被添加之後,第二頁爲保持空白頁)

我也無法找到任何解決方案如何刪除頁面列表列表。

回答

6

這很容易。我發現這在titlepage.templates.xsl

<xsl:template name="book.titlepage.before.verso"> 
    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/> 
</xsl:template>
啊哈!它是包含分頁符的模板,不是嗎?哇,我把它變成空模板時會發生?等voilà,解決方案發現:
<!-- clear verso --> 
<xsl:template name="book.titlepage.verso"/> 
<!-- clear page break after verso --> 
<xsl:template name="book.titlepage.before.verso"/>
以及如何刪除enoying表的列表?基本的TOC(內容表)設置複製到您的模板:

 
<xsl:param name="generate.toc"> 
    appendix toc,title 
    article/appendix nop 
    article toc,title 
    book  toc,title,figure,table,example,equation 
    chapter toc,title 
    part  toc,title 
    preface toc,title 
    qandadiv toc 
    qandaset toc 
    reference toc,title 
    sect1  toc 
    sect2  toc 
    sect3  toc 
    sect4  toc 
    sect5  toc 
    section toc 
    set  toc,title 
</xsl:param>

在列表中的所有,什麼是TOC被收集在文件的某些部分。如果您刪除figure,table,example,equation,則會獲得標準目錄。

注意:該列表說,其中塊應該是內容表,並在哪些塊不應該。如果您需要減少TOC深度,則必須添加到您的模板中,例如:

<xsl:param name="toc.max.depth">2</xsl:param>