XSL-FO 文档中 'break-after' 的准确含义是什么?
What is the precise meaning of 'break-after' in an XSL-FO document?
我正在尝试找出最好的方法来描述属性 break-after
对包含多个段落的两栏页面布局的影响:
<fo:block text-align="justify" font-size="14pt" break-after="column">
<fo:block space-after="0.1in">In 294 BC, the people...</fo:block>
<fo:block space-after="0.1in">The Colossus was built...</fo:block>
<fo:block space-after="0.1in">The statue was toppled....</fo:block>
<fo:block space-after="0.1in">The statue remained on....</fo:block>
</fo:block>
如果我只看过这段代码生成的页面(而不是代码本身),并且被要求描述布局算法,我会简单地说 它用 as 填充第一列尽可能多的文字,然后将剩余的文字放入第二列。
在我看来,这几乎描述了正在发生的事情,但我无法将此描述与 break-after="column"
的含义相协调。例如 break-after
向我建议分栏符应该只出现在 之后 一个段落,但这显然不是发生的事情 - 在这个小文档中,它们经常出现在段落的中间段落。
谁能更准确地描述一下这个布局算法,并参考break-after="column"
的准确含义?
Here are the documents I'm using (.fo file, and the pdf it generates). Note that the materials come from the book XML: QuickStart Guide by Kevin Howard Goldberg
"它会用尽可能多的文本填充第一列,然后再将剩余的文本放入第二列。" 几乎就是这样。将字符转换为字形、将字形组合为线条、将线条放入块区域以及跨页面拆分块区域的工作都留给了 XSL 格式化程序。 FO 中属性的作用是指定 XSL 格式化程序也必须遵循的约束。例如,page-width
和 page-heights
是对页面大小的限制(它们包含在 https://www.w3.org/TR/xsl11/#fo_simple-page-master 的 'Constraints' 部分)。
keep-* 和 break-* 属性也是 XSL 格式化程序必须遵循的约束。它们如何应用和交互的详细信息在 XSL 1.1 (https://www.w3.org/TR/xsl11/#keepbreak). When you don't specify a break, no break will be forced, and the XSL Formatter will do its best based on other applicable constraints. That is, the default value for both break-before
and break-after
is auto
, and the definition of auto
for break-before
(https://www.w3.org/TR/xsl11/#break-before) 的第 4.8 节“保持和中断”中 "No break shall be forced"。定义也有这个注释:
Page breaks may occur as determined by the formatter's processing as affected by the "widow", "orphan", "keep-with-next", "keep-with-previous", and "keep-together" properties.
具体针对您的样本、您的问题和您提出的问题...应用了 break-after="column" 的 "block" 是一个包含四个的块里面有额外的方块。
在这个容器块上添加 break-after="column" 的字面意思是,"break to the next column at the end of this block." 所以在你的情况下,你有这四个块流动(无论这四个块是否内容是否导致自己的分栏是无关紧要的)。它们正在流入 two-column 布局,因为(显然)您的页面有两列指定为流动区域。
当格式化程序完成那些面粉块的内容时,最后一个内容以 "The statue remained on...." 开头,它完成了您指定 break-after="column" 的包含块的内容。
因此,格式化程序为附加内容注入了 column-break。在这种情况下,您位于 two-column 布局的第二列,因此跳转到下一列意味着转到下一页。因此,该块之后的内容从下一栏的顶部开始。
属性 break-after="column" 与这里或那里的流动无关,它只是指示格式化程序在我所在的元素的末尾指定,跳到下一栏并放下更多的东西。它不是继承的,不会以任何方式改变 children.
的行为
如果你想把它简化到第n级......这真的意味着当你遇到指定我的时,跳到下一栏并从更多内容开始。
我正在尝试找出最好的方法来描述属性 break-after
对包含多个段落的两栏页面布局的影响:
<fo:block text-align="justify" font-size="14pt" break-after="column">
<fo:block space-after="0.1in">In 294 BC, the people...</fo:block>
<fo:block space-after="0.1in">The Colossus was built...</fo:block>
<fo:block space-after="0.1in">The statue was toppled....</fo:block>
<fo:block space-after="0.1in">The statue remained on....</fo:block>
</fo:block>
如果我只看过这段代码生成的页面(而不是代码本身),并且被要求描述布局算法,我会简单地说 它用 as 填充第一列尽可能多的文字,然后将剩余的文字放入第二列。
在我看来,这几乎描述了正在发生的事情,但我无法将此描述与 break-after="column"
的含义相协调。例如 break-after
向我建议分栏符应该只出现在 之后 一个段落,但这显然不是发生的事情 - 在这个小文档中,它们经常出现在段落的中间段落。
谁能更准确地描述一下这个布局算法,并参考break-after="column"
的准确含义?
Here are the documents I'm using (.fo file, and the pdf it generates). Note that the materials come from the book XML: QuickStart Guide by Kevin Howard Goldberg
"它会用尽可能多的文本填充第一列,然后再将剩余的文本放入第二列。" 几乎就是这样。将字符转换为字形、将字形组合为线条、将线条放入块区域以及跨页面拆分块区域的工作都留给了 XSL 格式化程序。 FO 中属性的作用是指定 XSL 格式化程序也必须遵循的约束。例如,page-width
和 page-heights
是对页面大小的限制(它们包含在 https://www.w3.org/TR/xsl11/#fo_simple-page-master 的 'Constraints' 部分)。
keep-* 和 break-* 属性也是 XSL 格式化程序必须遵循的约束。它们如何应用和交互的详细信息在 XSL 1.1 (https://www.w3.org/TR/xsl11/#keepbreak). When you don't specify a break, no break will be forced, and the XSL Formatter will do its best based on other applicable constraints. That is, the default value for both break-before
and break-after
is auto
, and the definition of auto
for break-before
(https://www.w3.org/TR/xsl11/#break-before) 的第 4.8 节“保持和中断”中 "No break shall be forced"。定义也有这个注释:
Page breaks may occur as determined by the formatter's processing as affected by the "widow", "orphan", "keep-with-next", "keep-with-previous", and "keep-together" properties.
具体针对您的样本、您的问题和您提出的问题...应用了 break-after="column" 的 "block" 是一个包含四个的块里面有额外的方块。
在这个容器块上添加 break-after="column" 的字面意思是,"break to the next column at the end of this block." 所以在你的情况下,你有这四个块流动(无论这四个块是否内容是否导致自己的分栏是无关紧要的)。它们正在流入 two-column 布局,因为(显然)您的页面有两列指定为流动区域。
当格式化程序完成那些面粉块的内容时,最后一个内容以 "The statue remained on...." 开头,它完成了您指定 break-after="column" 的包含块的内容。
因此,格式化程序为附加内容注入了 column-break。在这种情况下,您位于 two-column 布局的第二列,因此跳转到下一列意味着转到下一页。因此,该块之后的内容从下一栏的顶部开始。
属性 break-after="column" 与这里或那里的流动无关,它只是指示格式化程序在我所在的元素的末尾指定,跳到下一栏并放下更多的东西。它不是继承的,不会以任何方式改变 children.
的行为如果你想把它简化到第n级......这真的意味着当你遇到指定我的时,跳到下一栏并从更多内容开始。