fix chapter titles in toc
authorJan Szejko <janek37@gmail.com>
Mon, 3 Sep 2018 12:31:58 +0000 (14:31 +0200)
committerJan Szejko <janek37@gmail.com>
Mon, 3 Sep 2018 12:31:58 +0000 (14:31 +0200)
librarian/pdf/wl2tex.xslt

index 6c60125..8124410 100644 (file)
         </xsl:attribute>
         <parm><xsl:apply-templates mode="inline"/></parm>
         <parm>
-            <xsl:for-each select="./text()">
-                <xsl:value-of select="."/>
+            <!-- osobny szablon? -->
+            <xsl:for-each select="./text() | nbsp | dywiz | alien">
+                <xsl:choose>
+                    <xsl:when test="name() = 'nbsp'">
+                        <xsl:text> </xsl:text>
+                    </xsl:when>
+                    <xsl:when test="name() = 'dywiz'">
+                        <xsl:text>-</xsl:text>
+                    </xsl:when>
+                    <xsl:when test="name() = 'alien'">
+                        <xsl:apply-templates mode="inline" />
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:value-of select="."/>
+                    </xsl:otherwise>
+                </xsl:choose>
             </xsl:for-each>
         </parm>
     </cmd>