如何打印/显示 MathML 表达式?

问题描述

目前我正在尝试将 textField 与 markup="html" 一起使用,但它不起作用。

示例

<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement positionType="Float" stretchType="RelativeToTallestObject" x="100" y="0" width="450" height="25" isPrintWhenDetailOverflows="true" uuid="1aeaa5e9-4136-4239-a301-2733598340d9">
    <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
</reportElement>
<textElement verticalAlignment="Middle" markup="html">
    <paragraph lineSpacing="Single" leftIndent="5" rightIndent="3"/>
</textElement>
<textFieldExpression><![CDATA[$F{question}]]></textFieldExpression>

$F{question} 包含:

"<p id="id"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>+</mo><mo>&#160;</mo><mi>B</mi><mo>&#160;</mo><mo>&#160;</mo><msqrt><mi>c</mi><mfenced><mrow><mi>d</mi><mfenced open="[" close="]"><mi>r</mi></mfenced></mrow></mfenced></msqrt><mo>&#160;</mo><mi>&#948;</mi><mo>&#160;</mo><mo>&#8734;</mo><mi mathvariant="normal">&#960;</mi><mo>&#160;</mo></math></p>"

预期结果:

Expected Result

我得到的结果:

Result which I get

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)