我想知道是否有可能在当前行(fo:block)中插入一个水平拆分(50:50)的多行内联元素。
这幅画应该描述我的意思:
<fo:block>100mm<fo:inline>+4mm</fo:inline><fo:inline>-4mm</fo:inline>text...</fo:block>
如您所见,内联数据“100 4mm将正常进行,然后特定数据"+4mm”和"-4mm“将以行高50%的方式进行,并分层在另一层上。之后将添加其余的内容。”
这有可能吗?我使用AntennaHouse格式化程序来呈现。
发布于 2016-06-16 04:59:38
MathML是你的朋友:
<fo:block>This is my data: <fo:instream-foreign-object>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<msubsup>
<mi>100mm</mi>
<mi>+4mm</mi>
<mi>-4mm</mi>
</msubsup>
</math>
</fo:instream-foreign-object> and here it goes on...</fo:block>
如果要包含大量的MathML,可以将MathML的命名空间声明放在XSLT的xsl:stylesheet
元素上,这样命名空间将在整个样式表的范围内,并且也将在结果的fo:root
上结束。
发布于 2016-06-16 05:02:28
像Martin所描述的一个基本解决方案也有效:
<fo:block start-indent="0">
This is my data: 100mm
<fo:inline-container baseline-shift="4.25pt">
<fo:block text-align="right" font-size="4.25pt">+5mm</fo:block>
<fo:block text-align="right" font-size="4.25pt">-5mm</fo:block>
</fo:inline-container> and here it goes on...
</fo:block>
这提供了所需的输出。
谢谢你的帮助。
https://stackoverflow.com/questions/37857920
复制