diff options
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.xsl | 10 | ||||
-rw-r--r-- | utility/master.xsl | 2 |
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> |