fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43fe93c
)
subscripts in WL XML
author
Jan Szejko
<janek37@gmail.com>
Fri, 30 Jun 2017 12:39:46 +0000
(14:39 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Fri, 30 Jun 2017 12:39:46 +0000
(14:39 +0200)
librarian/epub/xsltScheme.xsl
patch
|
blob
|
history
librarian/fb2/inline.xslt
patch
|
blob
|
history
librarian/pdf/wl.cls
patch
|
blob
|
history
librarian/pdf/wl2tex.xslt
patch
|
blob
|
history
librarian/xslt/book2html.xslt
patch
|
blob
|
history
librarian/xslt/book2txt.xslt
patch
|
blob
|
history
librarian/xslt/config.xml
patch
|
blob
|
history
librarian/xslt/normalize.xslt
patch
|
blob
|
history
tests/files/example-wl.xml
patch
|
blob
|
history
diff --git
a/librarian/epub/xsltScheme.xsl
b/librarian/epub/xsltScheme.xsl
index
c9c6a75
..
d6f69bb
100644
(file)
--- a/
librarian/epub/xsltScheme.xsl
+++ b/
librarian/epub/xsltScheme.xsl
@@
-264,6
+264,12
@@
</em>
</xsl:template>
</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 />
<xsl:template match="osoba" >
<em class="person" xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates />
diff --git
a/librarian/fb2/inline.xslt
b/librarian/fb2/inline.xslt
index
03c6b65
..
3429e29
100644
(file)
--- a/
librarian/fb2/inline.xslt
+++ b/
librarian/fb2/inline.xslt
@@
-34,6
+34,11
@@
<xsl:apply-templates mode="inline"/>
</strong>
</xsl:template>
<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">
<!-- text -->
<xsl:template match="text()" mode="inline">
diff --git
a/librarian/pdf/wl.cls
b/librarian/pdf/wl.cls
index
30dbf63
..
575f7c4
100644
(file)
--- a/
librarian/pdf/wl.cls
+++ b/
librarian/pdf/wl.cls
@@
-527,6
+527,9
@@
Letters={Uppercase}
\newcommand{\wyroznienie}[1]{%
\emph{#1}%
}
\newcommand{\wyroznienie}[1]{%
\emph{#1}%
}
+\newcommand{\indeksdolny}[1]{%
+\textsubscript{#1}%
+}
\newcommand{\osoba}[1]{%
#1%
\newcommand{\osoba}[1]{%
#1%
diff --git
a/librarian/pdf/wl2tex.xslt
b/librarian/pdf/wl2tex.xslt
index
43092e7
..
8a31a22
100644
(file)
--- a/
librarian/pdf/wl2tex.xslt
+++ b/
librarian/pdf/wl2tex.xslt
@@
-362,7
+362,7
@@
<!-- ================================================ -->
<xsl:template mode="inline"
<!-- ================================================ -->
<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())" />
<cmd>
<xsl:attribute name="name">
<xsl:value-of select="wl:texcommand(name())" />
diff --git
a/librarian/xslt/book2html.xslt
b/librarian/xslt/book2html.xslt
index
d39a76a
..
07588b6
100644
(file)
--- a/
librarian/xslt/book2html.xslt
+++ b/
librarian/xslt/book2html.xslt
@@
-300,6
+300,10
@@
<em class="author-emphasis"><xsl:apply-templates mode="inline" /></em>
</xsl:template>
<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>
<xsl:template match="osoba" mode="inline">
<em class="person"><xsl:apply-templates mode="inline" /></em>
</xsl:template>
diff --git
a/librarian/xslt/book2txt.xslt
b/librarian/xslt/book2txt.xslt
index
89c9dfd
..
322dd74
100644
(file)
--- a/
librarian/xslt/book2txt.xslt
+++ b/
librarian/xslt/book2txt.xslt
@@
-275,6
+275,10
@@
<xsl:text>*</xsl:text><xsl:apply-templates mode="inline" /><xsl:text>*</xsl:text>
</xsl:template>
<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>
<xsl:template match="osoba" mode="inline">
<xsl:apply-templates mode="inline" />
</xsl:template>
diff --git
a/librarian/xslt/config.xml
b/librarian/xslt/config.xml
index
e9e999c
..
4730f4b
100644
(file)
--- a/
librarian/xslt/config.xml
+++ b/
librarian/xslt/config.xml
@@
-36,6
+36,7
@@
<wyroznienie />
<osoba />
<tytul_dziela />
<wyroznienie />
<osoba />
<tytul_dziela />
+ <indeks_dolny />
</inline-elements>
<paragraph-elements element="p" mixed="true">
</inline-elements>
<paragraph-elements element="p" mixed="true">
diff --git
a/librarian/xslt/normalize.xslt
b/librarian/xslt/normalize.xslt
index
494d028
..
85a2a65
100644
(file)
--- a/
librarian/xslt/normalize.xslt
+++ b/
librarian/xslt/normalize.xslt
@@
-329,6
+329,12
@@
</xsl:element>
</xsl:template>
</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()" />
<xsl:template match="mat">
<xsl:element name="math">
<xsl:apply-templates select="@*|node()" />
diff --git
a/tests/files/example-wl.xml
b/tests/files/example-wl.xml
index
d2fd87b
..
6a06517
100644
(file)
--- a/
tests/files/example-wl.xml
+++ b/
tests/files/example-wl.xml
@@
-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>
<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>
</akap>
<akap>[Przypisy: pa, pt, pr, pe]</akap>