<m:mo stretchy="false">}</m:mo>
</m:mrow>
</xsl:when>
+ <!-- APPEND -->
+ <xsl:when test="$name='append'">
+ <xsl:choose>
+ <xsl:when test="$charlength >= $framewidth">
+ <m:mtable align="baseline 1" equalrows="false" columnalign="left">
+ <m:mtr>
+ <m:mtd>
+ <m:mrow>
+ <xsl:apply-templates select="*[2]"/>
+ <m:mo>@</m:mo>
+ </m:mrow>
+ </m:mtd>
+ </m:mtr>
+ <m:mtr>
+ <m:mtd>
+ <m:mrow>
+ <xsl:apply-templates select="*[3]"/>
+ </m:mrow>
+ </m:mtd>
+ </m:mtr>
+ </m:mtable>
+ </xsl:when>
+ <xsl:otherwise>
+ <m:mrow>
+ <xsl:apply-templates select="*[2]"/>
+ <m:mo>@</m:mo>
+ <xsl:apply-templates select="*[3]"/>
+ </m:mrow>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
<!-- ITE -->
<xsl:when test="$name='ite'">
<xsl:choose>
</xsl:template>
<xsl:template match="m:ci|m:csymbol" mode="charcount">
-<xsl:param name="incurrent_length" select="0"/>
-<xsl:param name="nosibling" select="0"/>
+ <xsl:param name="incurrent_length" select="0"/>
+ <xsl:param name="nosibling" select="0"/>
+ <xsl:variable name="mylength">
+ <xsl:choose>
+ <!-- special notation -->
+ <xsl:when test="text()='append'">3</xsl:when>
+ <!-- no notation -->
+ <xsl:otherwise>
+ <xsl:value-of select="string-length()"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:choose>
- <xsl:when test="$framewidth > ($incurrent_length + string-length()) and ($nosibling = 0)">
- <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length + string-length()"/></xsl:apply-templates></xsl:variable>
+ <xsl:when test="$framewidth > ($incurrent_length + $mylength) and ($nosibling = 0)">
+ <xsl:variable name="siblength"><xsl:apply-templates select="following-sibling::*[position()=1]" mode="charcount"><xsl:with-param name="incurrent_length" select="$incurrent_length + $mylength"/></xsl:apply-templates></xsl:variable>
<xsl:choose>
<xsl:when test="string($siblength) = """>
- <xsl:value-of select="$incurrent_length + string-length()"/>
+ <xsl:value-of select="$incurrent_length + $mylength"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="number($siblength)"/>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="$incurrent_length + string-length()"/>
+ <xsl:value-of select="$incurrent_length + $mylength"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>