diff options
Diffstat (limited to 'utility')
-rw-r--r-- | utility/formatter.xsl | 23 | ||||
-rw-r--r-- | utility/master.xsl | 2 |
2 files changed, 18 insertions, 7 deletions
diff --git a/utility/formatter.xsl b/utility/formatter.xsl index 606a764..fb4acec 100644 --- a/utility/formatter.xsl +++ b/utility/formatter.xsl @@ -107,7 +107,7 @@ <xsl:when test="contains(@class, 'display')"> <p class="math"> <xsl:call-template name="math_highlighter"> - <xsl:with-param name="source" select="substring(text(),3,string-length(text())-4)"/> + <xsl:with-param name="source" select="text()"/> <xsl:with-param name="arguments"> <xsl:text>--display-mode</xsl:text> </xsl:with-param> @@ -117,7 +117,7 @@ <xsl:otherwise> <span class="math"> <xsl:call-template name="math_highlighter"> - <xsl:with-param name="source" select="substring(text(),3,string-length(text())-4)"/> + <xsl:with-param name="source" select="text()"/> </xsl:call-template> </span> </xsl:otherwise> @@ -126,12 +126,23 @@ <xsl:template name="formatter"> <xsl:param name="source"/> + <xsl:param name="format"/> <xsl:variable name="content"> - <xsl:call-template name="plain_formatter"> - <xsl:with-param name="format">pandoc -f markdown -t html4 --katex --no-highlight -fmarkdown-implicit_figures</xsl:with-param> - <xsl:with-param name="source" select="$source"/> - </xsl:call-template> + <xsl:choose> + <xsl:when test="contains($format, 'md')"> + <xsl:call-template name="plain_formatter"> + <xsl:with-param name="format">pandoc -f markdown -t html4 --katex --no-highlight -fmarkdown-implicit_figures</xsl:with-param> + <xsl:with-param name="source" select="$source"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="plain_formatter"> + <xsl:with-param name="format">pandoc -f <xsl:value-of select="$format"/> -t html4 --katex --no-highlight</xsl:with-param> + <xsl:with-param name="source" select="$source"/> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> </xsl:variable> <xsl:apply-templates select="xalan:nodeset($content)" mode="embellish"/> diff --git a/utility/master.xsl b/utility/master.xsl index cf348e3..0358627 100644 --- a/utility/master.xsl +++ b/utility/master.xsl @@ -26,8 +26,8 @@ <meta name="viewport" content="width=device-width,initial-scale=1.0"/> <link rel="stylesheet" type="text/css" href="/main.css" /> - <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> <link rel='alternate' type='application/atom+xml' href='/atom.xml'/> + <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIHJ4PSIyMCIgZmlsbD0iI2ZmODgwMCI+PC9yZWN0PjxwYXRoIGZpbGw9IiNmZmYiIGQ9IiI+PC9wYXRoPjwvc3ZnPg=="/> <xsl:if test="//*[(self::p or self::span) and @class = 'math']"> <link rel="stylesheet" type="text/css" href="https://static.kummerlaender.eu/katex/katex.min.css" /> |