<?xml version='1.0' encoding=“UTF-8”?> <xsl:stylesheet xmlns:xsl=“www.w3.org/1999/XSL/Transform”
xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:inst="http://instructure.com/functions" extension-element-prefixes="inst" version='1.0'> <xsl:template match="m:mover"> <xsl:call-template name="mover"> <xsl:with-param name="base"> <xsl:call-template name="startspace"> <xsl:with-param name="symbol" select="./*[1]"/> </xsl:call-template> </xsl:with-param> <xsl:with-param name="over"> <xsl:call-template name="startspace"> <xsl:with-param name="symbol" select="./*[2]"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:template> <xsl:template name="mover"> <xsl:param name="base"/> <xsl:param name="over"/> <xsl:variable name="diacritics-regex" select="'^[̀-̸⃐-⃯]$'" /> <xsl:variable name="is-diacritical-mark" select="inst:matches($over, $diacritics-regex)" /> <!-- original: scripts.xsl line 128 --> <!-- modified based on: mml2tex.xsl line 312 --> <xsl:choose> <xsl:when test="$over = '⏞' or $over = '⏟'"> <xsl:text>\overbrace</xsl:text> </xsl:when> <xsl:when test="$over = '⎴' or $over = '⎵'"> <xsl:text>\overbracket</xsl:text> </xsl:when> <xsl:when test="$over = '^'"><!-- superscript circumflex/caret --> <xsl:choose> <xsl:when test="string-length($base) > 1">\widehat</xsl:when> <xsl:otherwise>\hat</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="$over = '~'"><!-- superscript tilde --> <xsl:choose> <xsl:when test="string-length($base) > 1">\widetilde</xsl:when> <xsl:otherwise>\tilde</xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="inst:matches($over, '^[¯_̄̅‾]$')"><!-- macron, combining macron, combining overline --> <xsl:text>\overline</xsl:text> </xsl:when> <xsl:when test="$is-diacritical-mark"> <xsl:apply-templates select="./*[2]"/> </xsl:when> <xsl:otherwise> <xsl:text>\overset{</xsl:text> <xsl:apply-templates select="./*[2]"/> <xsl:text>}</xsl:text> </xsl:otherwise> </xsl:choose> <xsl:text>{</xsl:text> <xsl:apply-templates select="./*[1]"/> <xsl:text>}</xsl:text> </xsl:template>
</xsl:stylesheet>