]> granicus.if.org Git - docbook-dsssl/commitdiff
Don't use fo:instream-foreign-object if we are processing with
authorMichael Smith <xmldoc@users.sourceforge.net>
Sat, 6 Oct 2007 07:09:45 +0000 (07:09 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Sat, 6 Oct 2007 07:09:45 +0000 (07:09 +0000)
passivetex. Closes #1806899. Thanks to Justus Piater.

xsl/fo/math.xsl

index 77ec2d5ec328907f1203d0395cda195170950226..5bcdb469b57d65ef541959e694f6babe0899cf92 100644 (file)
 <!-- "Support" for MathML -->
 
 <xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML">
-  <fo:instream-foreign-object>
-    <xsl:copy>
-      <xsl:copy-of select="@*"/>
-      <xsl:apply-templates/>
-    </xsl:copy>
-  </fo:instream-foreign-object>
+  <xsl:choose>
+    <!-- * If user is using passivetex, we don't wrap the output in -->
+    <!-- * fo:instream-foreign-object (which passivetex doesn't support). -->
+    <!-- * The text expression below came from Justus Piater; see bug 1806899; -->
+    <!-- * http://docbook.sf.net/tracker/id/1806899 -->
+    <xsl:when test="$passivetex.extensions != 0 and $tex.math.in.alt != ''">
+      <xsl:copy>
+        <xsl:copy-of select="@*"/>
+        <xsl:apply-templates/>
+      </xsl:copy>
+    </xsl:when>
+    <xsl:otherwise>
+      <fo:instream-foreign-object>
+        <xsl:copy>
+          <xsl:copy-of select="@*"/>
+          <xsl:apply-templates/>
+        </xsl:copy>
+      </fo:instream-foreign-object>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">