source: stylesheets/lfs-xsl/docbook-xsl-1.78.1/fo/math.xsl@ 15c7d39

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 7.5 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 15c7d39 was 15c7d39, checked in by Matthew Burgess <matthew@…>, 11 years ago

Update stylesheets to docbook-xsl-1.78.1.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10355 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.8 KB
Line 
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
4 xmlns:mml="http://www.w3.org/1998/Math/MathML"
5 exclude-result-prefixes="mml"
6 version='1.0'>
7
8<!-- ********************************************************************
9 $Id: math.xsl 9647 2012-10-26 17:42:03Z bobstayton $
10 ********************************************************************
11
12 This file is part of the XSL DocBook Stylesheet distribution.
13 See ../README or http://docbook.sf.net/release/xsl/current/ for
14 copyright and other information.
15
16 ******************************************************************** -->
17
18<xsl:template match="inlineequation">
19 <xsl:apply-templates/>
20</xsl:template>
21
22<xsl:template match="alt">
23</xsl:template>
24
25<xsl:template match="mathphrase">
26 <fo:inline>
27 <xsl:apply-templates/>
28 </fo:inline>
29</xsl:template>
30
31<!-- "Support" for MathML -->
32
33<xsl:template match="mml:math" xmlns:mml="http://www.w3.org/1998/Math/MathML">
34 <fo:instream-foreign-object>
35 <xsl:copy>
36 <xsl:copy-of select="@*"/>
37 <xsl:apply-templates/>
38 </xsl:copy>
39 </fo:instream-foreign-object>
40</xsl:template>
41
42<xsl:template match="mml:*" xmlns:mml="http://www.w3.org/1998/Math/MathML">
43 <xsl:copy>
44 <xsl:copy-of select="@*"/>
45 <xsl:apply-templates/>
46 </xsl:copy>
47</xsl:template>
48
49<xsl:template match="equation/graphic | informalequation/graphic">
50 <xsl:if test="$tex.math.in.alt = ''">
51 <fo:block>
52 <xsl:call-template name="process.image"/>
53 </fo:block>
54 </xsl:if>
55</xsl:template>
56
57<xsl:template match="inlineequation/alt[@role='tex'] |
58 inlineequation/inlinemediaobject/textobject[@role='tex']" priority="1">
59 <xsl:param name="output.delims" select="1"/>
60</xsl:template>
61
62<xsl:template match="equation/alt[@role='tex'] | informalequation/alt[@role='tex'] |
63 equation/mediaobject/textobject[@role='tex'] |
64 informalequation/mediaobject/textobject[@role='tex']" priority="1">
65 <xsl:variable name="output.delims">
66 <xsl:call-template name="tex.math.output.delims"/>
67 </xsl:variable>
68</xsl:template>
69
70<xsl:template name="tex.math.output.delims">
71 <xsl:variable name="pi.delims">
72 <xsl:call-template name="pi-attribute">
73 <xsl:with-param name="pis" select=".//processing-instruction('dbtex')"/>
74 <xsl:with-param name="attribute" select="'delims'"/>
75 </xsl:call-template>
76 </xsl:variable>
77 <xsl:variable name="result">
78 <xsl:choose>
79 <xsl:when test="$pi.delims = 'no'">0</xsl:when>
80 <xsl:when test="$pi.delims = '' and $tex.math.delims = 0">0</xsl:when>
81 <xsl:otherwise>1</xsl:otherwise>
82 </xsl:choose>
83 </xsl:variable>
84 <xsl:value-of select="$result"/>
85</xsl:template>
86
87</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.