merge conflicting on stripping spaces
[librarian.git] / librarian / pdf / wl2tex.xslt
index a6e8c10..fd14d5c 100644 (file)
@@ -33,7 +33,8 @@
         </xsl:for-each>
         </TeXML>
 
-        <xsl:choose>
+<!-- WHAT. THE. FUCK. -->
+<!--        <xsl:choose>
             <xsl:when test="@morefloats = 'new'">
                 <TeXML escape="0">
                     \usepackage[maxfloats=64]{morefloats}
@@ -52,7 +53,7 @@
                     }{}
                 </TeXML>
             </xsl:otherwise>
-        </xsl:choose>
+        </xsl:choose>-->
 
         <xsl:apply-templates select="rdf:RDF" mode="titlepage" />
         <xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" mode='titlepage' />
@@ -96,6 +97,7 @@
 
             <xsl:apply-templates select="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny" />
             <xsl:apply-templates select="utwor" mode="part" />
+
         </env>
     </TeXML>
 </xsl:template>
 </xsl:template>
 
 <xsl:template
-    match="naglowek_akt|naglowek_czesc|srodtytul|naglowek_osoba|naglowek_podrozdzial|naglowek_scena|naglowek_rozdzial|miejsce_czas|didaskalia|lista_osoba|akap|akap_dialog|akap_cd|motto_podpis|naglowek_listy|lista">
+    match="naglowek_akt|naglowek_czesc|srodtytul|naglowek_osoba|naglowek_podrozdzial|naglowek_scena|naglowek_rozdzial|miejsce_czas|didaskalia|lista_osoba|akap|akap_dialog|akap_cd|motto_podpis|naglowek_listy|lista|nota_red">
   <xsl:if test="name(following-sibling::*[1])='autor_rozdzialu'">
     <cmd name="autorrozdzialu"><parm><xsl:value-of select="following-sibling::*[1]/text()"/></parm></cmd>
   </xsl:if>
 <!-- = (contain other inline tags and special tags) = -->
 <!-- ================================================ -->
 
+<xsl:strip-space elements="nota|akap|wyroznienie"/>
+
 <xsl:template mode="inline"
-    match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba|punkt|www">
+    match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba|punkt|www|nota_red">
     <cmd>
         <xsl:attribute name="name">
             <xsl:value-of select="wl:texcommand(name())" />
     </cmd>
 </xsl:template>
 
+<xsl:template mode="inline"
+    match="wyimek">
+    <env>
+        <xsl:attribute name="name">
+            <xsl:value-of select="wl:texcommand(name())" />
+        </xsl:attribute>
+        <xsl:apply-templates mode="inline"/>
+    </env>
+</xsl:template>
+<xsl:template
+    match="wyimek_extra">
+    <env>
+        <xsl:attribute name="name">
+            <xsl:value-of select="wl:texcommand(name())" />
+        </xsl:attribute>
+        <xsl:apply-templates mode="inline"/>
+    </env>
+</xsl:template>
+
+
 
 
 <xsl:template match="tytul_dziela" mode="inline">
   </math>
 </xsl:template>
 
+<xsl:template match="latex">
+  <TeXML escape="0">
+    <xsl:for-each select="text()">
+      <xsl:value-of select="normalize-space(.)"/>
+    </xsl:for-each>
+  </TeXML>
+</xsl:template>
+
 <xsl:template match="latex" mode="inline">
   <TeXML escape="0">
-    <xsl:apply-templates select="@*|node()" mode="identity"/>
+    <xsl:for-each select="text()">
+      <xsl:value-of select="normalize-space(.)"/>
+    </xsl:for-each>
   </TeXML>
 </xsl:template>
 
+
 <xsl:template match="tablewrap">
   <cmd name="begin"><parm>table</parm><opt>h!</opt></cmd>
   <xsl:apply-templates select="table"/>
 <xsl:template match="extra|uwaga" />
 <xsl:template match="extra|uwaga" mode="inline" />
 
-<xsl:template match="nota_red" />
+<!-- make it a command: <xsl:template match="nota_red" />-->
+
 
 <!-- ======== -->
 <!-- = TEXT = -->