mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-635 Add MathJax to Mirage2 theme
This commit is contained in:
@@ -295,6 +295,33 @@
|
|||||||
<meta name="{@element}" content="{.}"></meta>
|
<meta name="{@element}" content="{.}"></meta>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<!-- Add MathJAX CDN to render scientific formulas -->
|
||||||
|
<xsl:if test="confman:getProperty('webui.browse.render-scientific-formulas') = 'true'">
|
||||||
|
<script type="text/x-mathjax-config">
|
||||||
|
MathJax.Hub.Config({
|
||||||
|
tex2jax: {
|
||||||
|
inlineMath: [['$','$'], ['\\(','\\)']],
|
||||||
|
ignoreClass: "detail-field-data|detailtable"
|
||||||
|
},
|
||||||
|
TeX: {
|
||||||
|
Macros: {
|
||||||
|
AA: '{\\mathring A}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
|
||||||
|
<xsl:when test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request'][@qualifier='scheme']='https'">
|
||||||
|
<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user