微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

docbook 中没有分页符

如何解决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.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?