2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns:fo="http://www.w3.org/1999/XSL/Format"
5 xmlns:mml="http://www.w3.org/1998/Math/MathML"
6 exclude-result-prefixes="mml d"
9 <!-- ********************************************************************
11 This file is part of the XSL DocBook Stylesheet distribution.
12 See ../README or http://cdn.docbook.org/release/xsl/current/ for
13 copyright and other information.
15 ******************************************************************** -->
17 <xsl:template match="d:inlineequation">
18 <xsl:apply-templates/>
21 <xsl:template match="d:alt">
24 <xsl:template match="d:mathphrase">
26 <xsl:apply-templates/>
30 <!-- "Support" for MathML -->
32 <xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML">
33 <fo:instream-foreign-object>
35 <xsl:copy-of select="@*"/>
36 <xsl:apply-templates/>
38 </fo:instream-foreign-object>
41 <xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
43 <xsl:copy-of select="@*"/>
44 <xsl:apply-templates/>
48 <xsl:template match="d:equation/d:graphic | d:informalequation/d:graphic">
49 <xsl:if test="$tex.math.in.alt = ''">
51 <xsl:call-template name="process.image"/>
56 <xsl:template match="d:inlineequation/d:alt[@role='tex'] |
57 d:inlineequation/d:inlinemediaobject/d:textobject[@role='tex']" priority="1">
58 <xsl:param name="output.delims" select="1"/>
61 <xsl:template match="d:equation/d:alt[@role='tex'] | d:informalequation/d:alt[@role='tex'] |
62 d:equation/d:mediaobject/d:textobject[@role='tex'] |
63 d:informalequation/d:mediaobject/d:textobject[@role='tex']" priority="1">
64 <xsl:variable name="output.delims">
65 <xsl:call-template name="tex.math.output.delims"/>
69 <xsl:template name="tex.math.output.delims">
70 <xsl:variable name="pi.delims">
71 <xsl:call-template name="pi-attribute">
72 <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
73 <xsl:with-param name="attribute" select="'delims'"/>
76 <xsl:variable name="result">
78 <xsl:when test="$pi.delims = 'no'">0</xsl:when>
79 <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
80 <xsl:otherwise>1</xsl:otherwise>
83 <xsl:value-of select="$result"/>