aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-12-20 21:46:20 +0100
committerAdrian Kummerlaender2016-12-20 21:46:20 +0100
commit0fc13c9422d340faf757eec2bf76219df4b309fd (patch)
treea02769af3fe1fb903b73f13af6e4f9146a82ff93 /utility
parent84bb92c05f266905fc7e4cbefe3e8b56cbb7a877 (diff)
downloadblog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar.gz
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar.bz2
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar.lz
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar.xz
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.tar.zst
blog.kummerlaender.eu-0fc13c9422d340faf757eec2bf76219df4b309fd.zip
Switch server side math renderer to _KaTeX_
_KaTeX_ offers explicit support for server-side rendering instead of the hacky solution using _Mathjax_. Furtermore it ist noticeably faster and produces better output in my test cases.
Diffstat (limited to 'utility')
-rw-r--r--utility/formatter.xsl10
-rw-r--r--utility/master.xsl2
2 files changed, 6 insertions, 6 deletions
diff --git a/utility/formatter.xsl b/utility/formatter.xsl
index d346190..e30a549 100644
--- a/utility/formatter.xsl
+++ b/utility/formatter.xsl
@@ -24,12 +24,10 @@
<xsl:variable name="formatted_expression">
<xsl:call-template name="plain_formatter">
<xsl:with-param name="format">
- <xsl:text>tex2html </xsl:text>
+ <xsl:text>katex </xsl:text>
<xsl:value-of select="$arguments"/>
- <xsl:text> '</xsl:text>
- <xsl:value-of select="$source"/>
- <xsl:text>'</xsl:text>
</xsl:with-param>
+ <xsl:with-param name="source" select="$source"/>
</xsl:call-template>
</xsl:variable>
@@ -95,6 +93,9 @@
<p class="math">
<xsl:call-template name="math_highlighter">
<xsl:with-param name="source" select="text()"/>
+ <xsl:with-param name="arguments">
+ <xsl:text>--display-mode</xsl:text>
+ </xsl:with-param>
</xsl:call-template>
</p>
</xsl:when>
@@ -102,7 +103,6 @@
<span class="math">
<xsl:call-template name="math_highlighter">
<xsl:with-param name="source" select="text()"/>
- <xsl:with-param name="arguments" select="'--inline'"/>
</xsl:call-template>
</span>
</xsl:otherwise>
diff --git a/utility/master.xsl b/utility/master.xsl
index 405d742..42687d5 100644
--- a/utility/master.xsl
+++ b/utility/master.xsl
@@ -30,7 +30,7 @@
<link rel='alternate' type='application/atom+xml' href='/atom.xml'/>
<xsl:if test="//*[(self::p or self::span) and @class = 'math']">
- <link rel="stylesheet" type="text/css" href="/math.css" />
+ <link rel="stylesheet" type="text/css" href="https://static.kummerlaender.eu/katex/katex.min.css" />
</xsl:if>
<title>