Bugzilla – Attachment 81741 Details for
Bug 66287
Add an option to insert MathJax script element when exporting to XHTML
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
mathjax.diff (text/plain), 2.67 KB, created by
Frédéric Wang
on 2013-06-30 13:17:31 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang
Created:
2013-06-30 13:17:31 UTC
Size:
2.67 KB
patch
obsolete
>diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl >index 556d317..33fafca 100644 >--- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl >+++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl >@@ -399,6 +399,18 @@ > </xsl:call-template> > </xsl:for-each> > >+ <xsl:if test="$mathjaxEnabled"> >+ <!-- insert the script tag to load MathJax --> >+ <xsl:element name="script"> >+ <xsl:attribute name="type">text/javascript</xsl:attribute> >+ <xsl:attribute name="src"><xsl:value-of select="$mathjaxURL" /></xsl:attribute> >+ <!-- A self closing script tag seems to confuse HTML5 >+ parsers. To work around that issue, we create a dummy >+ comment node inside. --> >+ <xsl:comment>Load the MathJax Library</xsl:comment> >+ </xsl:element> >+ </xsl:if> >+ > <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" hreflang="en" /> > <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" hreflang="en" /> > <link rel="schema.DCTYPE" href="http://purl.org/dc/dcmitype/" hreflang="en" /> >diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl >index f334edb..b92d0d4 100644 >--- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl >+++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl >@@ -124,6 +124,11 @@ > <xsl:param name="onlyStyleOutput" select="false()" /> > <xsl:param name="onlyStyleOutputEnabled" select="boolean($onlyStyleOutput)" /> > >+ <!-- OPTIONAL: for inserting a script tag to load MathJax set the variable here to 'true()' or give any value from outside --> >+ <xsl:param name="mathjax" select="false()" /> >+ <xsl:param name="mathjaxEnabled" select="boolean($mathjax)" /> >+ <xsl:param name="mathjaxURL" select="'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=MML_HTMLorMML'" /> >+ > <!-- ************************************* --> > <!-- *** build the propriate HTML file *** --> > <!-- ************************************* --> >@@ -169,6 +174,8 @@ > <xsl:message>Parameter debugEnabled: <xsl:value-of select="$debugEnabled" /></xsl:message> > <xsl:message>Parameter java: <xsl:value-of select="$java" /></xsl:message> > <xsl:message>Parameter javaEnabled: <xsl:value-of select="$javaEnabled" /></xsl:message> >+ <xsl:message>Parameter mathjaxEnabled: <xsl:value-of select="$mathjaxEnabled" /></xsl:message> >+ <xsl:message>Parameter mathjaxURI: <xsl:value-of select="$mathjaxURI" /></xsl:message> > </xsl:template> > > </xsl:stylesheet>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 66287
:
81593
|
81594
| 81741