fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3cc5929
)
add tag ramka
author
Jan Szejko
<janek37@gmail.com>
Mon, 6 Nov 2017 15:09:01 +0000
(16:09 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Mon, 6 Nov 2017 15:10:34 +0000
(16:10 +0100)
librarian/epub/style.css
patch
|
blob
|
history
librarian/epub/xsltScheme.xsl
patch
|
blob
|
history
librarian/fb2/paragraphs.xslt
patch
|
blob
|
history
librarian/html.py
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
scripts/master.css
patch
|
blob
|
history
tests/files/example-wl.xml
patch
|
blob
|
history
diff --git
a/librarian/epub/style.css
b/librarian/epub/style.css
index
e01ca62
..
5e8f278
100644
(file)
--- a/
librarian/epub/style.css
+++ b/
librarian/epub/style.css
@@
-272,6
+272,11
@@
h2 + .paragraph:first-letter
font-style: italic;
}
font-style: italic;
}
+.frame
+{
+ border: 1px darkgray solid;
+}
+
hr.spacer
{
height: 3em;
hr.spacer
{
height: 3em;
diff --git
a/librarian/epub/xsltScheme.xsl
b/librarian/epub/xsltScheme.xsl
index
e04cb9d
..
4031949
100644
(file)
--- a/
librarian/epub/xsltScheme.xsl
+++ b/
librarian/epub/xsltScheme.xsl
@@
-67,6
+67,12
@@
</div>
</xsl:template>
</div>
</xsl:template>
+ <xsl:template match="ramka">
+ <div class="frame" xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:apply-templates />
+ </div>
+ </xsl:template>
+
<xsl:template match="motto">
<div class="motto" xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates />
<xsl:template match="motto">
<div class="motto" xmlns="http://www.w3.org/1999/xhtml">
<xsl:apply-templates />
diff --git
a/librarian/fb2/paragraphs.xslt
b/librarian/fb2/paragraphs.xslt
index
4307234
..
ed90d2a
100644
(file)
--- a/
librarian/fb2/paragraphs.xslt
+++ b/
librarian/fb2/paragraphs.xslt
@@
-49,6
+49,9
@@
<td><xsl:apply-templates mode="inline" /></td>
</xsl:template>
<td><xsl:apply-templates mode="inline" /></td>
</xsl:template>
+ <xsl:template mode="para" match="ramka">
+ <xsl:apply-templates mode="para" />
+ </xsl:template>
<xsl:template mode="para" match="*"/>
<xsl:template mode="para" match="*"/>
diff --git
a/librarian/html.py
b/librarian/html.py
index
73da1b8
..
defb84c
100644
(file)
--- a/
librarian/html.py
+++ b/
librarian/html.py
@@
-217,7
+217,7
@@
def add_anchors(root):
counter = 1
for element in root.iterdescendants():
def f(e):
counter = 1
for element in root.iterdescendants():
def f(e):
- return e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication') or \
+ return e.get('class') in ('note', 'motto', 'motto_podpis', 'dedication'
, 'frame'
) or \
e.get('id') == 'nota_red' or e.tag == 'blockquote'
if any_ancestor(element, f):
continue
e.get('id') == 'nota_red' or e.tag == 'blockquote'
if any_ancestor(element, f):
continue
diff --git
a/librarian/pdf/wl.cls
b/librarian/pdf/wl.cls
index
4d010a9
..
989f73e
100644
(file)
--- a/
librarian/pdf/wl.cls
+++ b/
librarian/pdf/wl.cls
@@
-381,6
+381,13
@@
Letters={Uppercase}
\end{em}%
}
\end{em}%
}
+\newcommand{\ramka}[1]{%
+\noindent\fbox{%
+\parbox{\textwidth}{%
+#1%
+}}%
+}
+
\newcommand{\dlugicytat}[1]{%
\begin{quotation}%
#1%
\newcommand{\dlugicytat}[1]{%
\begin{quotation}%
#1%
diff --git
a/librarian/pdf/wl2tex.xslt
b/librarian/pdf/wl2tex.xslt
index
fec49b9
..
970c175
100644
(file)
--- a/
librarian/pdf/wl2tex.xslt
+++ b/
librarian/pdf/wl2tex.xslt
@@
-249,7
+249,7
@@
<!-- ==================================================================================== -->
<xsl:template
<!-- ==================================================================================== -->
<xsl:template
- match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|nota|dedykacja|dlugi_cytat|poezja_cyt|motto">
+ match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|nota|dedykacja|dlugi_cytat|poezja_cyt|motto
|ramka
">
<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
4b6c72a
..
b2a028b
100644
(file)
--- a/
librarian/xslt/book2html.xslt
+++ b/
librarian/xslt/book2html.xslt
@@
-101,6
+101,10
@@
<div class="dedication"><xsl:apply-templates /></div>
</xsl:template>
<div class="dedication"><xsl:apply-templates /></div>
</xsl:template>
+<xsl:template match="ramka">
+ <div class="frame"><xsl:apply-templates /></div>
+</xsl:template>
+
<xsl:template match="kwestia">
<div class="kwestia">
<xsl:apply-templates select="strofa|akap|didaskalia" />
<xsl:template match="kwestia">
<div class="kwestia">
<xsl:apply-templates select="strofa|akap|didaskalia" />
diff --git
a/librarian/xslt/book2txt.xslt
b/librarian/xslt/book2txt.xslt
index
36032cf
..
8589121
100644
(file)
--- a/
librarian/xslt/book2txt.xslt
+++ b/
librarian/xslt/book2txt.xslt
@@
-40,6
+40,10
@@
<xsl:apply-templates />
</xsl:template>
<xsl:apply-templates />
</xsl:template>
+<xsl:template match="ramka">
+<xsl:apply-templates />
+</xsl:template>
+
<xsl:template match="lista_osob">
<xsl:text>
<xsl:template match="lista_osob">
<xsl:text>
diff --git
a/librarian/xslt/config.xml
b/librarian/xslt/config.xml
index
29905da
..
9eaa34e
100644
(file)
--- a/
librarian/xslt/config.xml
+++ b/
librarian/xslt/config.xml
@@
-26,6
+26,7
@@
<kwestia />
<motto />
<didaskalia />
<kwestia />
<motto />
<didaskalia />
+ <ramka />
</block>
<inline-elements element="span" mixed="true">
</block>
<inline-elements element="span" mixed="true">
@@
-134,6
+135,8
@@
<dlugi_cytat />
<poezja_cyt />
<dlugi_cytat />
<poezja_cyt />
+ <ramka />
+
<didaskalia />
</editable>
</config>
<didaskalia />
</editable>
</config>
diff --git
a/scripts/master.css
b/scripts/master.css
index
0346839
..
a7cdb00
100644
(file)
--- a/
scripts/master.css
+++ b/
scripts/master.css
@@
-175,6
+175,10
@@
div.note p, div.dedication p, div.note p.paragraph, div.dedication p.paragraph {
font-style: italic;
}
font-style: italic;
}
+div.frame {
+ border: 1px darkgray solid;
+}
+
hr.spacer {
height: 3em;
visibility: hidden;
hr.spacer {
height: 3em;
visibility: hidden;
diff --git
a/tests/files/example-wl.xml
b/tests/files/example-wl.xml
index
3c4b29b
..
9950f9d
100644
(file)
--- a/
tests/files/example-wl.xml
+++ b/
tests/files/example-wl.xml
@@
-93,6
+93,10
@@
autor_utworu, dzielo_nadrzedne, nazwa_utworu, podtytul, tłumacz (z DC)]</akap>
<dlugi_cytat><akap>Cytowany akapit powinien wyglądać jak cytowany akapit.
Znaczy, może mieć jakieś dodatkowe wcięcie, jakiś rodzaj wyróżnienia czy coś.</akap></dlugi_cytat>
<dlugi_cytat><akap>Cytowany akapit powinien wyglądać jak cytowany akapit.
Znaczy, może mieć jakieś dodatkowe wcięcie, jakiś rodzaj wyróżnienia czy coś.</akap></dlugi_cytat>
+<akap>[ramka/akap]</akap>
+
+<ramka><akap>To jest ramka. W ramce są akapity i inne takie.</akap></ramka>
+
<akap>[poezja_cyt/strofa]</akap>
<poezja_cyt><strofa>To jest poezja/
<akap>[poezja_cyt/strofa]</akap>
<poezja_cyt><strofa>To jest poezja/