我遇到过如果TOC标题太接近TOC编号的情况,它会向内拉数字。
在这里你可以看到几个例子,我开始一次添加/删除一个字符,以查看它何时向内错误地拉出编号与正确包装到下一行。
这是来自topic.fo的两个块。第一个是没有拉入TOC编号,第二个是拉入编号。
<fo:block
start-indent="0in + (2 * 30pt) + 14pt">
<fo:block
end-indent="22pt"
font-size="10pt"
font-style="italic"
font-weight="normal"
last-line-end-indent="-22pt"
text-align="justify"
text-align-last="justify"
text-indent="-14pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:basic-link
internal-destination="_OPENTOPIC_TOC_PROCESSING_d73e797"
line-height="150%"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:inline
end-indent="14pt"
keep-together.within-line="auto"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">Notes Associated with an Improperly Filled Card or a Negative Profile (Biopattern)</fo:inline>
<fo:leader
leader-pattern="dots"/>
<fo:inline
keep-together.within-line="always"
padding-left.length="12pt"
start-indent="-14pt"
text-align="right"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">2-<fo:page-number-citation
ref-id="_OPENTOPIC_TOC_PROCESSING_d73e797"/>
</fo:inline>
</fo:basic-link>
</fo:block>
</fo:block>
<fo:block
start-indent="0in + (2 * 30pt) + 14pt">
<fo:block
end-indent="22pt"
font-size="10pt"
font-style="italic"
font-weight="normal"
last-line-end-indent="-22pt"
text-align="justify"
text-align-last="justify"
text-indent="-14pt"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:basic-link
internal-destination="_OPENTOPIC_TOC_PROCESSING_d73e800"
line-height="150%"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">
<fo:inline
end-indent="14pt"
keep-together.within-line="auto"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">Notes Associated with an Improperly Filled Card or with a Negative Profile (Biopat</fo:inline>
<fo:leader
leader-pattern="dots"/>
<fo:inline
keep-together.within-line="always"
padding-left.length="12pt"
start-indent="-14pt"
text-align="right"
line-height-shift-adjustment="disregard-shifts"
font-family="Helvetica, Arial Unicode MS">2-<fo:page-number-citation
ref-id="_OPENTOPIC_TOC_PROCESSING_d73e800"/>
</fo:inline>
</fo:basic-link>
</fo:block>
我已经尝试调整不同的末端缩进,看看我是否可以强制它包装而没有任何运气。我正在使用DITA-OT 1.5.4和FOP 1.0。
答案 0 :(得分:4)
看起来像FOP中的错误,请参阅FAQ。
如果引用,则会发生fo:page-number-citation元素 在FOP格式化请求的页面之前发生,通常在TOC或 索引页面。它是由FOP必须猜测的问题引起的 未知页码占用的空间很大,通常是 猜测有点偏。
最新的FOP版本应该修复此问题。检查是否可以升级。