从DocBook文档中删除反义词和表列表 [英] Remove verso and list of tables from DocBook document
问题描述
我对DocBook XSL的自定义层有疑问.我使用Apache FOP将文档从DocBook XML转换为PDF.但是本书包含第二页(即所谓的 verso )和第二页表列表.我只是删除了verso的内容,但是第二页现在还是空的.我现在不知道如何删除第二个空白页.
I have problem with customization layer of DocBook XSL. I use Apache FOP to transform document from DocBook XML to PDF. But the book contains second page (so called verso) and page List of Tables. I just have erased the content of verso, but second page remains empty now. I don't now how to remove second empty page.
(我只找到一种解决方案.很简单-只需将<xsl:template name="book.titlepage.verso"/>
添加到您的模板中,但是在添加了此元素之后,第二页仍为空白页.)
(I have found one solution only. It is easy - just add <xsl:template name="book.titlepage.verso"/>
to your templates, but after this element has been added, second page remains as empty page.)
我同样找不到任何解决方法,该如何删除页面表列表.
I'm likewise unable to find any solution how to remove page List of Tables.
推荐答案
很简单.我在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>
中找到了这个 啊哈!它是包含分页符的模板,不是吗?当我将其变成一个空模板时会发生什么? Etvoilà,找到的解决方法:
Aha! It is the template including page break, isn't? What happens when I turn it into an empty template? Et voilà, solution found:
<!-- clear verso -->
<xsl:template name="book.titlepage.verso"/>
<!-- clear page break after verso -->
<xsl:template name="book.titlepage.before.verso"/>
以及如何删除烦人的表列表?将基本的目录(目录)设置复制到模板中:
And how to remove annoying List of Tables? Copy basic TOC (table of content) settings into your template:
<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
,则会获得标准目录.
In the list is everything that is to be collected in TOC in certain parts of the document. If you remove figure,table,example,equation
, you get standard table of content.
注意:该列表显示,哪些块应为目录,哪些块不应为目录.如果需要减小TOC的深度,则必须将其添加到模板中,例如:
Note: The list says, in which blocks should be table of content and in which blocks should not. If you need to reduce depth of TOC, you must add into your template e.g.:
<xsl:param name="toc.max.depth">2</xsl:param>
这篇关于从DocBook文档中删除反义词和表列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!