diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-11-20 14:34:25 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-11-20 14:34:25 -0500 |
commit | 1f50a383a7a1f89b0b9e9089e151623fab60d774 (patch) | |
tree | 0f29f9e2a975a9d0f66c6ec6b619b18961346a4f /data/xslt | |
parent | e17899653d8c35a72cceb6b65bd4becc59872fa9 (diff) | |
download | yelp-1f50a383a7a1f89b0b9e9089e151623fab60d774.tar.gz |
Local copy of MathJax so we don't have to hit CDN
Diffstat (limited to 'data/xslt')
-rw-r--r-- | data/xslt/yelp-common.xsl.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/data/xslt/yelp-common.xsl.in b/data/xslt/yelp-common.xsl.in index d81270c7..73b75aba 100644 --- a/data/xslt/yelp-common.xsl.in +++ b/data/xslt/yelp-common.xsl.in @@ -2,8 +2,9 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:yelp="http://www.gnome.org/yelp/ns" xmlns:set="http://exslt.org/sets" + xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1999/xhtml" - exclude-result-prefixes="set" + exclude-result-prefixes="yelp set mml" extension-element-prefixes="yelp" version="1.0"> @@ -14,6 +15,17 @@ <xsl:param name="html.syntax.highlight" select="true()"/> <xsl:param name="html.js.root" select="'file://@XSL_JSDIR@/'"/> +<xsl:template name="html.js.mathjax"> + <xsl:param name="node" select="."/> + <xsl:if test="$node//mml:*[1]"> + <script type="text/javascript"> + <xsl:attribute name="src"> + <xsl:text>file://@DATADIR@/mathjax/MathJax.js?config=yelp</xsl:text> + </xsl:attribute> + </script> + </xsl:if> +</xsl:template> + <!-- == html.output == --> <xsl:template name="html.output"> <xsl:param name="node" select="."/> |