Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 1833
Image: ubuntu2004
1
<?xml version="1.0"?>
2
<xsl:stylesheet version="1.0"
3
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
<xsl:import href="html.xsl" />
5
<xsl:output method="xml"/>
6
7
<xsl:template match="statement">
8
<div class="exercise-statement"><p><strong><xsl:value-of select="../@checkit-slug"/>.</strong></p><xsl:apply-templates/></div>
9
</xsl:template>
10
11
<xsl:template match="answer">
12
<div class="exercise-answer">
13
<h4>Partial Answer:</h4>
14
<xsl:apply-templates/>
15
</div>
16
</xsl:template>
17
18
<xsl:template name="image-based-math"><xsl:param name="latex"/><img><xsl:attribute name="alt">LaTeX: <xsl:value-of select="normalize-space($latex)"/></xsl:attribute><xsl:attribute name="title">LaTeX: <xsl:value-of select="normalize-space($latex)"/></xsl:attribute><xsl:attribute name="data-equation-content"><xsl:value-of select="normalize-space($latex)"/></xsl:attribute></img></xsl:template>
19
20
<xsl:template match="me"><p style="text-align:center;"><xsl:call-template name="image-based-math"><xsl:with-param name="latex"><xsl:value-of select="."/></xsl:with-param></xsl:call-template></p></xsl:template>
21
22
<xsl:template match="md">
23
<p style="text-align:center;">
24
<xsl:call-template name="image-based-math">
25
<xsl:with-param name="latex">
26
\begin{align*} <xsl:apply-templates select="mrow"/> \end{align*}
27
</xsl:with-param>
28
</xsl:call-template>
29
</p>
30
</xsl:template>
31
32
33
<xsl:template match="m"><xsl:call-template name="image-based-math"><xsl:with-param name="latex"><xsl:value-of select="."/></xsl:with-param></xsl:call-template></xsl:template>
34
35
</xsl:stylesheet>
36