[Om] OpenMath pmml2tex.xsl bugs
Nathaniel Dosé
dosena at mail.com
Tue Sep 20 09:49:58 CEST 2011
Hello,
I was just trying out the Presentation MathML-to-TeX XSLT sheets at
http://svn.openmath.org/OpenMath/OpenMath2++/.
The sheets are of excellent quality, but I ran into these 2 bugs on my
system:
1)
at the end of pmml2tex.xsl there is a rule matching MathML's <math>
nodes. Then, at the top of pmml2texfrag.xsl, there is a duplicate rule
that tries to match the same. This second rule, which looks rather
important (as it starts TeX math mode), never fires.
This fixed things for me:
% diff pmml2tex.xsl~ pmml2tex.xsl
98c98
< <xsl:apply-templates mode="pmml2tex"/>
---
> <xsl:apply-templates mode="pmml2tex" select="."/>
2)
pmml2texfrag.xsl generates an "\msup" in TeX everytime an <msup> is
encountered in the MathML input.
This leads to an 'undefined control sequence' error when processing the
TeX output. There is no '\msup' defined anywhere - at least on my TeX
installation.
Using \sp (similar to how \sb is used for subscripts) solves the problem:
% diff pmml2texfrag.xsl~ pmml2texfrag.xsl
333c333
< <xsl:text>{\msup{</xsl:text>
---
> <xsl:text>{{</xsl:text>
335c335
< <xsl:text>}{</xsl:text>
---
> <xsl:text>}\sp{</xsl:text>
623c623
Thanks and best regards,
Nathaniel Dosé
More information about the Om
mailing list