aboutsummaryrefslogtreecommitdiffstats
path: root/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl
diff options
context:
space:
mode:
authorManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 21:18:33 +0000
committerManuel Canales Esparcia <manuel@linuxfromscratch.org>2007-07-05 21:18:33 +0000
commitc873d8072e3e1fb78b1be4ba5e3f8e3548d29694 (patch)
treefb2387ca1b158477659e00660269c92b94f4a00a /stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl
parentbdbaf3eb1f0b1c8ef150764638c7473b9c25db96 (diff)
Added new-xsl files.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl')
-rw-r--r--stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl36
1 files changed, 36 insertions, 0 deletions
diff --git a/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl
new file mode 100644
index 000000000..9fa13dd7a
--- /dev/null
+++ b/stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/passivetex.xsl
@@ -0,0 +1,36 @@
+<?xml version='1.0' encoding="utf-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ version='1.0'>
+
+<!-- ********************************************************************
+ $Id$
+ ********************************************************************
+ This extension stops PassiveTeX from merging subsequent '-' to
+ dashes. You must set passivetex.extensions to '1' if you want get
+ this functionality.
+ ******************************************************************** -->
+
+<xsl:template name="passivetex.dash.subst">
+ <xsl:param name="string"/>
+
+ <xsl:choose>
+ <xsl:when test="contains($string, '--')">
+ <xsl:variable name="rest">
+ <xsl:call-template name="passivetex.dash.subst">
+ <xsl:with-param name="string"
+ select="concat('-', substring-after($string, '--'))"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:value-of select="concat(substring-before($string, '--'),
+ '-&#x200b;',
+ $rest)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
+