subscripts in WL XML
authorJan Szejko <janek37@gmail.com>
Fri, 30 Jun 2017 12:39:46 +0000 (14:39 +0200)
committerJan Szejko <janek37@gmail.com>
Fri, 30 Jun 2017 12:39:46 +0000 (14:39 +0200)
librarian/epub/xsltScheme.xsl
librarian/fb2/inline.xslt
librarian/pdf/wl.cls
librarian/pdf/wl2tex.xslt
librarian/xslt/book2html.xslt
librarian/xslt/book2txt.xslt
librarian/xslt/config.xml
librarian/xslt/normalize.xslt
tests/files/example-wl.xml

index c9c6a75..d6f69bb 100644 (file)
     </em>
   </xsl:template>
 
+  <xsl:template match="indeks_dolny" >
+    <sub xmlns="http://www.w3.org/1999/xhtml">
+      <xsl:apply-templates />
+    </sub>
+  </xsl:template>
+
   <xsl:template match="osoba" >
     <em class="person" xmlns="http://www.w3.org/1999/xhtml">
       <xsl:apply-templates />
index 03c6b65..3429e29 100644 (file)
                        <xsl:apply-templates mode="inline"/>
                </strong>
        </xsl:template>
+       <xsl:template match="indeks_dolny" mode="inline">
+               <sub>
+                       <xsl:apply-templates mode="inline"/>
+               </sub>
+       </xsl:template>
 
        <!-- text -->
        <xsl:template match="text()" mode="inline">
index 30dbf63..575f7c4 100644 (file)
@@ -527,6 +527,9 @@ Letters={Uppercase}
 \newcommand{\wyroznienie}[1]{%
 \emph{#1}%
 }
+\newcommand{\indeksdolny}[1]{%
+\textsubscript{#1}%
+}
 
 \newcommand{\osoba}[1]{%
 #1%
index 43092e7..8a31a22 100644 (file)
 <!-- ================================================ -->
 
 <xsl:template mode="inline"
-    match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba">
+    match="pa|pe|pr|pt|mat|didask_tekst|slowo_obce|wyroznienie|osoba|indeks_dolny">
     <cmd>
         <xsl:attribute name="name">
             <xsl:value-of select="wl:texcommand(name())" />
index d39a76a..07588b6 100644 (file)
     <em class="author-emphasis"><xsl:apply-templates mode="inline" /></em>
 </xsl:template>
 
+<xsl:template match="indeks_dolny" mode="inline">
+    <sub><xsl:apply-templates mode="inline" /></sub>
+</xsl:template>
+
 <xsl:template match="osoba" mode="inline">
     <em class="person"><xsl:apply-templates mode="inline" /></em>
 </xsl:template>
index 89c9dfd..322dd74 100644 (file)
 <xsl:text>*</xsl:text><xsl:apply-templates mode="inline" /><xsl:text>*</xsl:text>
 </xsl:template>
 
+<xsl:template match="indeks_dolny" mode="inline">
+<xsl:apply-templates mode="inline" />
+</xsl:template>
+
 <xsl:template match="osoba" mode="inline">
 <xsl:apply-templates mode="inline" />
 </xsl:template>
index e9e999c..4730f4b 100644 (file)
@@ -36,6 +36,7 @@
         <wyroznienie />
         <osoba />
         <tytul_dziela />
+        <indeks_dolny />
     </inline-elements>
 
     <paragraph-elements element="p" mixed="true">
index 494d028..85a2a65 100644 (file)
         </xsl:element>
     </xsl:template>
 
+    <xsl:template match="indeks_dolny">
+        <xsl:element name="sub">
+            <xsl:apply-templates select="@*|node()" />
+        </xsl:element>
+    </xsl:template>
+
     <xsl:template match="mat">
         <xsl:element name="math">
             <xsl:apply-templates select="@*|node()" />
index d2fd87b..6a06517 100644 (file)
@@ -127,6 +127,7 @@ rzu.</strofa>
 <tytul_dziela typ="1">tytul_dziela@typ=1</tytul_dziela>,
 <wyroznienie>wyroznienie</wyroznienie>,
 <slowo_obce>slowo_obce</slowo_obce>
+indeks_dolny: H<indeks_dolny>2</indeks_dolny>O
 </akap>
 
 <akap>[Przypisy: pa, pt, pr, pe]</akap>