docbook 中没有分页符

问题描述

对于我正在写的书,我采用了 docbook 的方式。很多美好的事情,但是,经过大量的工作,我开始后悔了。我在渲染部分使用 XMLmind(使用 Bbedit 进行编辑)。 最后一滴是当我意识到在 docbook 文档中插入分页符没有简单的方法时。也就是说,除非您研究了所有 XSL 文档并尝试使用与 XMLmind 不同的样式表。

http://www.sagehill.net/docbookxsl/PageBreaking.html 我看到我应该放

<xsl:template match="processing-instruction('hard-pagebreak')">
   <fo:block break-after='page'/>
 </xsl:template>

某处,和

<?hard-pagebreak?>

我需要强制分页的地方。但重点是:这是 XMLmind 处理的 xml 文件标题

<book version="5.1" xml:lang="it" xmlns="http://docbook.org/ns/docbook"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:trans="http://docbook.org/ns/transclusion"
      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">

应该在哪里添加模板?

回答你的问题,原代码为:

<?xml version="1.0" encoding="UTF-8"?>
<book version="5.1" xml:lang="it" xmlns="http://docbook.org/ns/docbook"
      xmlns:xlink="http://www.w3.org/1999/xlink"
      xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:trans="http://docbook.org/ns/transclusion"
      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>This is a book</title>
  </info>

  <chapter xml:id="ch_intro">
    <title>Introduction</title>

    <section xml:id="first_section">
      <title>The first section</title>

      <para>Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do 
      eiusmod tempor incididunt ut labore et dolore magna aliqua. 
      Ut enim ad minim veniam,quis nostrud exercitation ullamco 
      laboris nisi ut aliquip ex ea commodo consequat.</para>
    </section>

    <section xml:id="second_section">
      <title>The second section</title>

      <para>Lorem ipsum dolor sit amet,quis nostrud exercitation ullamco 
      laboris nisi ut aliquip ex ea commodo consequat.</para>
    </section>
  </chapter>
</book>

我想在第一节和第二节之间插入一个分页符

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...