From: <ce...@us...> - 2011-09-08 15:04:05
|
Revision: 2654 http://daisymfc.svn.sourceforge.net/daisymfc/?rev=2654&view=rev Author: cegli Date: 2011-09-08 15:03:55 +0000 (Thu, 08 Sep 2011) Log Message: ----------- Improvements to the LaTeX transformer - quote [] right after an \item with {} - normalize-space inside abbrevs Modified Paths: -------------- trunk/dmfc/transformers/se_tpb_dtbook2latex/dtbook2latex_common.xsl Modified: trunk/dmfc/transformers/se_tpb_dtbook2latex/dtbook2latex_common.xsl =================================================================== --- trunk/dmfc/transformers/se_tpb_dtbook2latex/dtbook2latex_common.xsl 2011-09-05 09:33:19 UTC (rev 2653) +++ trunk/dmfc/transformers/se_tpb_dtbook2latex/dtbook2latex_common.xsl 2011-09-08 15:03:55 UTC (rev 2654) @@ -752,9 +752,13 @@ </xsl:template> <xsl:template match="dtb:li"> - <xsl:text>\item </xsl:text> + <xsl:variable name="itemContent"> <xsl:apply-templates/> - <xsl:text> </xsl:text> + </xsl:variable> + <xsl:text>\item </xsl:text> + <!-- quote [] right after an \item with {} --> + <xsl:value-of select="replace($itemContent,'^(\s*)(\[.*\])','$1{$2}')"/> + <xsl:text> </xsl:text> </xsl:template> <xsl:template match="dtb:dl"> @@ -989,9 +993,9 @@ <!-- remove excessive space and insert non-breaking spaces inside abbrevs --> <xsl:template match="dtb:abbr//text()"> - <xsl:value-of select="my:quoteSpecialChars(replace(replace(string(current()), '\s+', ' '), ' ', ' '))"/> + <xsl:value-of select="my:quoteSpecialChars(replace(normalize-space(string(current())), ' ', ' '))"/> </xsl:template> - + <xsl:template match="text()"> <xsl:value-of select="my:quoteSpecialChars(string(current()))"/> </xsl:template> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |