我尝试使用 AH Formatter 并找到了两种解决方案。
[1]baseline-shift
用于后者fo:inline-container
<fo:block>
<fo:inline-container vertical-align="top" inline-progression-dimension="60%">
<fo:block start-indent="0.5em" text-indent="-0.5em" text-align-last="justify">
[1] Text here text here text here text here text here text here text here
<fo:leader leader-pattern="dots"/></fo:block></fo:inline-container><fo:inline-container baseline-shift="-1.44em" inline-progression-dimension="40%">
<fo:block start-indent="0.5em" text-indent="-0.5em" display-align="after">
Continued text here text here text here text here
</fo:block>
</fo:inline-container>
</fo:block>
我指定了`baseline-shift="-1.44em"。(这取决于使用的字体)此方法仅在第一行数等于 2 时有效。
[2] 使用fo:table
代替fo:inline-container
<fo:table width="100%">
<fo:table-column column-number="1" column-width="60%"/>
<fo:table-column column-number="2" column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block start-indent="0.5em" text-indent="-0.5em" text-align-last="justify">
[2] Text here text here text here text here text here text here text here
<fo:leader leader-pattern="dots"/></fo:block>
</fo:table-cell>
<fo:table-cell/>
</fo:table-row>
<fo:table-row>
<fo:table-cell/>
<fo:table-cell padding-before="-1.32em">
<fo:block start-indent="0.5em" text-indent="-0.5em" display-align="after">
Continued text here text here text here text here
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
此方法不依赖于第一个中的文本行fo:table-cell
。
使用 AH Formatter GUI 的两个格式化结果:
我的格式化程序版本是 6.4。但结果将是相同的。