summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex4ht/xttl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex4ht/xttl')
-rwxr-xr-xMaster/texmf-dist/tex4ht/xttl/oo-math.4xt100
-rwxr-xr-xMaster/texmf-dist/tex4ht/xttl/oo-text.4xt22
2 files changed, 71 insertions, 51 deletions
diff --git a/Master/texmf-dist/tex4ht/xttl/oo-math.4xt b/Master/texmf-dist/tex4ht/xttl/oo-math.4xt
index 18fcf35521e..f38c5342c6f 100755
--- a/Master/texmf-dist/tex4ht/xttl/oo-math.4xt
+++ b/Master/texmf-dist/tex4ht/xttl/oo-math.4xt
@@ -1,30 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" >
-<xtpipes preamble="yes" signature="oo-math.4xt (2006-12-04-16:41)">
+<xtpipes preamble="yes" signature="oo-math.4xt (2006-12-10-04:17)">
<sax content-handler="xtpipes.lib.ScriptsManager,OomFilter"
lexical-handler="xtpipes.lib.ScriptsManagerLH" >
<script element="math:mtable" >
<dom name="." xml="." method="mtable" class="OoUtilities" />
-<set name="rmXmlDecl" >
- <![CDATA[
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <xsl:output omit-xml-declaration = "yes" />
-
- <xsl:template match="*|@*|text()|comment()" >
- <xsl:copy>
- <xsl:apply-templates select="*|@*|text()|comment()" />
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
-]]>
-
-</set>
-<xslt name="." xml="." xsl="rmXmlDecl" />
-
</script>
<script element="math:math" >
@@ -37,29 +17,63 @@
>
<xsl:output omit-xml-declaration = "yes" />
- <xsl:template match=" math:mo[
+ <xsl:template match=" math:mo" >
+ <xsl:choose>
+ <xsl:when test="
(preceding-sibling::math:mn or preceding-sibling::math:mi)
and not(following-sibling::*)
-]" >
+" >
<math:mtext>
<xsl:apply-templates select="*|@*|text()" />
</math:mtext>
-</xsl:template>
-<xsl:template match=" math:mo[
+</xsl:when>
+<xsl:when test="
not(preceding-sibling::* or following-sibling::*)
-]" >
+" >
<math:mtext>
<xsl:apply-templates select="*|@*|text()" />
</math:mtext>
-</xsl:template>
-<xsl:template match=" math:mo[
+</xsl:when>
+<xsl:when test="
(.='{') or (.='}')
-]" >
+" >
<math:mtext>
<xsl:apply-templates select="*|@*|text()" />
</math:mtext>
-</xsl:template>
+</xsl:when>
+<xsl:when test=" . = '='" >
+ <xsl:choose>
+ <xsl:when test=" not(preceding-sibling::*)
+ or not(following-sibling::*)
+ or preceding-sibling::*[1] / self::math:mo
+ ">
+ <math:mtext>
+ <xsl:apply-templates select="*|@*|text()" />
+ </math:mtext>
+ </xsl:when>
+ <xsl:otherwise>
+ <math:mo>
+ <xsl:apply-templates select="*|@*|text()" />
+ </math:mo>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:when>
+ <xsl:when test=" string-length() &gt; 1 " >
+ <math:mtext>
+ <xsl:value-of select="normalize-space(.)" />
+ </math:mtext>
+</xsl:when>
+
+ <xsl:otherwise>
+ <math:mo>
+ <xsl:apply-templates select="@*" />
+ <xsl:value-of select="normalize-space(.)" />
+ </math:mo>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
<xsl:template match="*|@*|text()|comment()" >
<xsl:copy>
<xsl:apply-templates select="*|@*|text()|comment()" />
@@ -72,6 +86,32 @@
<xslt name="." xml="." xsl="math:mo" />
+ <set name="math:mspace" >
+ <![CDATA[
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:math="http://www.w3.org/1998/Math/MathML"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ >
+ <xsl:output omit-xml-declaration = "yes" />
+
+ <xsl:template match="math:mspace" >
+ <math:mtext>
+ <xsl:text> </xsl:text>
+ </math:mtext>
+</xsl:template>
+
+ <xsl:template match="*|@*|text()|comment()" >
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|text()|comment()" />
+ </xsl:copy>
+ </xsl:template>
+ </xsl:stylesheet>
+]]>
+
+</set>
+<xslt name="." xml="." xsl="math:mspace" />
+
</script>
</sax>
</xtpipes>
diff --git a/Master/texmf-dist/tex4ht/xttl/oo-text.4xt b/Master/texmf-dist/tex4ht/xttl/oo-text.4xt
index 70e4cde93af..5808b0a6111 100755
--- a/Master/texmf-dist/tex4ht/xttl/oo-text.4xt
+++ b/Master/texmf-dist/tex4ht/xttl/oo-text.4xt
@@ -1,31 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xtpipes SYSTEM "xtpipes.dtd" >
-<xtpipes preamble="yes" signature="oo-text.4xt (2006-12-04-16:41)">
+<xtpipes preamble="yes" signature="oo-text.4xt (2006-12-10-04:17)">
<sax content-handler="xtpipes.lib.ScriptsManager,OoFilter"
lexical-handler="xtpipes.lib.ScriptsManagerLH" >
<script element="table:table" >
<dom name="." xml="." method="table" class="OoUtilities" />
-<set name="rmXmlDecl" >
- <![CDATA[
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- >
- <xsl:output omit-xml-declaration = "yes" />
-
- <xsl:template match="*|@*|text()|comment()" >
- <xsl:copy>
- <xsl:apply-templates select="*|@*|text()|comment()" />
- </xsl:copy>
- </xsl:template>
- </xsl:stylesheet>
-]]>
-
-</set>
-<xslt name="." xml="." xsl="rmXmlDecl" />
-
</script>
</sax>