📄 pmml2svg-workinprogress.txt
字号:
<xsl:value-of select="$numHeight + $denHeight + $numHeightDen"/> </xsl:message> <xsl:attribute name="t:BASELINE"> <xsl:value-of select="$y + $numHeight + $denHeight + $numHeightDen"/> </xsl:attribute> <xsl:attribute name="t:TEXT"> <xsl:copy-of select="text()"/> </xsl:attribute> <xsl:copy-of select="$child1"/> <xsl:copy-of select="$child2"/> </xsl:copy> </xsl:template>--> <!-- ########################################################################### munderover (formatting) ################################################################################ --> <!-- <xsl:template match="math:munderover" mode="formatting"> <xsl:param name="size"/> <xsl:param name="x"/> <xsl:param name="y"/> <xsl:param name="baseline" select="0"/> <xsl:variable name="child1"> <xsl:apply-templates select="math:*[1]" mode="formatting"> <xsl:with-param name="size" select="$size * $sizeMult"/> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:apply-templates> </xsl:variable> <xsl:variable name="child2"> <xsl:apply-templates select="math:*[2]" mode="formatting"> <xsl:with-param name="size" select="$size * $sizeMult"/> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:apply-templates> </xsl:variable> <xsl:variable name="child3"> <xsl:apply-templates select="math:*[3]" mode="formatting"> <xsl:with-param name="size" select="$size * $sizeMult"/> <xsl:with-param name="x" select="$x"/> <xsl:with-param name="y" select="$y"/> </xsl:apply-templates> </xsl:variable> <xsl:variable name="numWidth"> <xsl:value-of select="$child1/*/@t:WIDTH"/> </xsl:variable> <xsl:variable name="denWidth"> <xsl:value-of select="$child2/*/@t:WIDTH"/> </xsl:variable> <xsl:variable name="numHeight"> <xsl:value-of select="$child1/*/@t:HEIGHT"/> </xsl:variable> <xsl:variable name="denHeight"> <xsl:value-of select="$child2/*/@t:HEIGHT"/> </xsl:variable> <xsl:message>numerator width / height : <xsl:value-of select="$child1/*/@t:WIDTH"/> - <xsl:value-of select="$child1/*/@t:HEIGHT"/> </xsl:message> <xsl:message>denominator width / height : <xsl:value-of select="$child2/*/@t:WIDTH"/> - <xsl:value-of select="$child2/*/@t:HEIGHT"/> </xsl:message> <xsl:variable name="maxWidth"> <xsl:choose> <xsl:when test="number($numWidth) < number($denWidth)"> <xsl:value-of select="$denWidth * 1.3"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$numWidth * 1.3"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="centering" select="($maxWidth - ($maxWidth * (10 div 13))) div 2"/> <xsl:variable name="denX"> <xsl:choose> <xsl:when test="number($numWidth) > number($denWidth)"> <xsl:value-of select="$centering + ((number($numWidth) - number($denWidth)) div 2)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$centering"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:variable name="numX"> <xsl:choose> <xsl:when test="number($numWidth) < number($denWidth)"> <xsl:value-of select="$centering + ((number($denWidth) - number($numWidth)) div 2)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$centering"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:message> <xsl:value-of select="$numWidth"/> < <xsl:value-of select="$denWidth"/> </xsl:message> <xsl:message>maxWidth: <xsl:value-of select="$maxWidth"/> </xsl:message> <xsl:variable name="denY" select="$numHeight + $numHeightDen"/> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="t:X"> <xsl:value-of select="$x"/> </xsl:attribute> <xsl:attribute name="t:Y"> <xsl:value-of select="$y"/> </xsl:attribute> <xsl:attribute name="t:numX"> <xsl:value-of select="$numX"/> </xsl:attribute> <xsl:attribute name="t:numHeight"> <xsl:value-of select="$numHeight"/> </xsl:attribute> <xsl:message>numHeight : <xsl:value-of select="$numHeight"/> </xsl:message> <xsl:attribute name="t:denX"> <xsl:value-of select="$denX"/> </xsl:attribute> <xsl:attribute name="t:denY"> <xsl:value-of select="$denY"/> </xsl:attribute> <xsl:attribute name="t:FONTSIZE"> <xsl:value-of select="$size"/> </xsl:attribute> <xsl:attribute name="t:WIDTH"> <xsl:value-of select="$maxWidth"/> </xsl:attribute> <xsl:attribute name="t:HEIGHT"> <xsl:value-of select="$numHeight + $denHeight + $numHeightDen"/> </xsl:attribute> <xsl:attribute name="t:BASELINE"> <xsl:value-of select="$y + $numHeight + $denHeight + $numHeightDen"/> </xsl:attribute> <xsl:message> <xsl:value-of select="$numHeight + $denHeight + $numHeightDen"/> </xsl:message> <xsl:attribute name="t:TEXT"> <xsl:copy-of select="text()"/> </xsl:attribute> <xsl:copy-of select="$child1"/> <xsl:copy-of select="$child2"/> <xsl:copy-of select="$child3"/> </xsl:copy> </xsl:template>--> <!-- ########################################################################### Munder (drawing) ################################################################################ --> <!-- <xsl:template match="math:munder|math:munderover" mode="draw"> <xsl:param name="xShift"/> <xsl:param name="yShift"/> <xsl:variable name="numX"> <xsl:value-of select="@t:numX"/> </xsl:variable> <xsl:variable name="denX"> <xsl:value-of select="@t:denX"/> </xsl:variable> <xsl:variable name="denY"> <xsl:value-of select="@t:denY"/> </xsl:variable> <xsl:variable name="x1"> <xsl:value-of select="@t:X + $xShift"/> </xsl:variable> <xsl:variable name="numHeight"> <xsl:value-of select="@t:numHeight "/> </xsl:variable> <xsl:variable name="y1"> <xsl:value-of select="@t:Y + $yShift + $numHeight + ($numHeightDen div 2)"/> </xsl:variable> <xsl:variable name="x2"> <xsl:value-of select="$x1 + @t:WIDTH"/> </xsl:variable> <xsl:variable name="y2"> <xsl:value-of select="$y1"/> </xsl:variable> <xsl:message>MFRAC !!!! | moveX = <xsl:value-of select="$numX"/> "/> num : <xsl:value-of select="$numX"/> den : <xsl:value-of select="$denX"/> </xsl:message> <xsl:apply-templates select="math:*[1]" mode="draw"> <xsl:with-param name="xShift" select="$xShift + $numX"/> <xsl:with-param name="yShift" select="$yShift"/> </xsl:apply-templates> <xsl:apply-templates select="math:*[2]" mode="draw"> <xsl:with-param name="xShift" select="$xShift + $denX"/> <xsl:with-param name="yShift" select="$yShift + $denY"/> </xsl:apply-templates> <xsl:message>BASELINE : <xsl:value-of select="$x1"/> </xsl:message> </xsl:template>--> <!-- ########################################################################### Mover(drawing) ################################################################################ --> <!-- <xsl:template match="math:mover" mode="draw"> <xsl:param name="xShift"/> <xsl:param name="yShift"/> <xsl:variable name="numX"> <xsl:value-of select="@t:numX"/> </xsl:variable> <xsl:variable name="denX"> <xsl:value-of select="@t:denX"/> </xsl:variable> <xsl:variable name="denY"> <xsl:value-of select="@t:denY"/> </xsl:variable> <xsl:variable name="x1"> <xsl:value-of select="@t:X + $xShift"/> </xsl:variable> <xsl:variable name="numHeight"> <xsl:value-of select="@t:numHeight "/> </xsl:variable> <xsl:variable name="y1"> <xsl:value-of select="@t:Y + $yShift + $numHeight + ($numHeightDen div 2)"/> </xsl:variable> <xsl:variable name="x2"> <xsl:value-of select="$x1 + @t:WIDTH"/> </xsl:variable> <xsl:variable name="y2"> <xsl:value-of select="$y1"/> </xsl:variable> <xsl:message>MFRAC !!!! | moveX = <xsl:value-of select="$numX"/> "/> num : <xsl:value-of select="$numX"/> den : <xsl:value-of select="$denX"/> </xsl:message> <xsl:apply-templates select="math:*[2]" mode="draw"> <xsl:with-param name="xShift" select="$xShift + $numX"/> <xsl:with-param name="yShift" select="$yShift"/> </xsl:apply-templates> <xsl:apply-templates select="math:*[1]" mode="draw"> <xsl:with-param name="xShift" select="$xShift + $denX"/> <xsl:with-param name="yShift" select="$yShift + $denY"/> </xsl:apply-templates> <xsl:message>BASELINE : <xsl:value-of select="$x1"/> </xsl:message> </xsl:template>-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -