Xml 如何在XSL FO中插入水平拆分内联元素?
我想知道是否以及如何将水平分割(50:50)的多行内联元素插入当前行(fo:block) 这张图片应该描述我的意思:Xml 如何在XSL FO中插入水平拆分内联元素?,xml,layout,xslt-2.0,xsl-fo,Xml,Layout,Xslt 2.0,Xsl Fo,我想知道是否以及如何将水平分割(50:50)的多行内联元素插入当前行(fo:block) 这张图片应该描述我的意思: 100mm+4mm-4mm长度。。。 如您所见,内联数据“100mm”将正常进行,然后特定数据“+4mm”和“-4mm”将以50%的行高进行,并在另一行上分层。之后,将添加其余内容 这可能吗? 我使用AntennaHouse格式化程序进行渲染。MathML是您的朋友: <fo:block>This is my data: <fo:instream-f
100mm+4mm-4mm长度。。。
如您所见,内联数据“100mm”将正常进行,然后特定数据“+4mm”和“-4mm”将以50%的行高进行,并在另一行上分层。之后,将添加其余内容
这可能吗?
我使用AntennaHouse格式化程序进行渲染。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>
这是我的数据:
100毫米
+4毫米
-4毫米
接下来就是。。。
参见,例如
如果要包含大量MathML,可以将MathML的名称空间声明放在XSLT的
xsl:stylesheet
元素上,这样名称空间将在整个样式表的范围内,并且最终也会出现在结果的fo:root
上。像Martin Honnen所描述的基本解决方案也可以:
<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>
这是我的数据:100毫米
+5毫米
-5毫米
接下来就是。。。
这将提供所需的输出。
谢谢您的帮助。我想知道您是否可以使用例如
100mm+4mm-4mmtext…
来实现这一点。这解决了我的问题。谢谢!
<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>