我遇到过这样一种情况,如果 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。