Loading xsl/jats/jats2html.xsl +22 −3 Original line number Diff line number Diff line Loading @@ -1344,11 +1344,30 @@ <xsl:template match="tex-math"> <xsl:choose> <xsl:when test="ancestor::inline-formula"> <xsl:choose> <xsl:when test="starts-with(node(), '$') and substring(node(), string-length(node()), 1) = '$'"> <xsl:copy-of select="concat('\(', substring(node(), 2, string-length(node()) - 2), '\)')"/> </xsl:when> <xsl:when test="starts-with(node(), '\(') and substring(node(), string-length(node()) - 1, 2) = '\)'"> <xsl:copy-of select="."/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="concat('\(',node(),'\)')"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:copy-of select="@*"/> <xsl:copy-of select="concat('$$',node(),'$$')"/> <xsl:choose> <xsl:when test="starts-with(node(), '$$') and substring(node(), string-length(node()) - 1, 2) = '$$'"> <xsl:copy-of select="concat('\[', substring(node(), 3, string-length(node()) - 4), '\]')"/> </xsl:when> <xsl:when test="starts-with(node(), '\[') and substring(node(), string-length(node()) - 1, 2) = '\]'"> <xsl:copy-of select="."/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="concat('\[',node(),'\]')"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Loading Loading
xsl/jats/jats2html.xsl +22 −3 Original line number Diff line number Diff line Loading @@ -1344,11 +1344,30 @@ <xsl:template match="tex-math"> <xsl:choose> <xsl:when test="ancestor::inline-formula"> <xsl:choose> <xsl:when test="starts-with(node(), '$') and substring(node(), string-length(node()), 1) = '$'"> <xsl:copy-of select="concat('\(', substring(node(), 2, string-length(node()) - 2), '\)')"/> </xsl:when> <xsl:when test="starts-with(node(), '\(') and substring(node(), string-length(node()) - 1, 2) = '\)'"> <xsl:copy-of select="."/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="concat('\(',node(),'\)')"/> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:otherwise> <xsl:copy-of select="@*"/> <xsl:copy-of select="concat('$$',node(),'$$')"/> <xsl:choose> <xsl:when test="starts-with(node(), '$$') and substring(node(), string-length(node()) - 1, 2) = '$$'"> <xsl:copy-of select="concat('\[', substring(node(), 3, string-length(node()) - 4), '\]')"/> </xsl:when> <xsl:when test="starts-with(node(), '\[') and substring(node(), string-length(node()) - 1, 2) = '\]'"> <xsl:copy-of select="."/> </xsl:when> <xsl:otherwise> <xsl:copy-of select="concat('\[',node(),'\]')"/> </xsl:otherwise> </xsl:choose> </xsl:otherwise> </xsl:choose> </xsl:template> Loading