From: Jan Szejko Date: Mon, 6 Nov 2017 15:09:01 +0000 (+0100) Subject: add tag ramka X-Git-Tag: 1.7~36 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/8a57745b13b2875fcf6441b06171a1fd762c51ee add tag ramka --- diff --git a/librarian/epub/style.css b/librarian/epub/style.css index e01ca62..5e8f278 100644 --- a/librarian/epub/style.css +++ b/librarian/epub/style.css @@ -272,6 +272,11 @@ h2 + .paragraph:first-letter font-style: italic; } +.frame +{ + border: 1px darkgray solid; +} + hr.spacer { height: 3em; diff --git a/librarian/epub/xsltScheme.xsl b/librarian/epub/xsltScheme.xsl index e04cb9d..4031949 100644 --- a/librarian/epub/xsltScheme.xsl +++ b/librarian/epub/xsltScheme.xsl @@ -67,6 +67,12 @@ + +
+ +
+
+
diff --git a/librarian/fb2/paragraphs.xslt b/librarian/fb2/paragraphs.xslt index 4307234..ed90d2a 100644 --- a/librarian/fb2/paragraphs.xslt +++ b/librarian/fb2/paragraphs.xslt @@ -49,6 +49,9 @@ + + + diff --git a/librarian/html.py b/librarian/html.py index 73da1b8..defb84c 100644 --- 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): - 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 diff --git a/librarian/pdf/wl.cls b/librarian/pdf/wl.cls index 4d010a9..989f73e 100644 --- a/librarian/pdf/wl.cls +++ b/librarian/pdf/wl.cls @@ -381,6 +381,13 @@ Letters={Uppercase} \end{em}% } +\newcommand{\ramka}[1]{% +\noindent\fbox{% +\parbox{\textwidth}{% +#1% +}}% +} + \newcommand{\dlugicytat}[1]{% \begin{quotation}% #1% diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index fec49b9..970c175 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -249,7 +249,7 @@ + match="powiesc|opowiadanie|liryka_l|liryka_lp|dramat_wierszowany_l|dramat_wierszowany_lp|dramat_wspolczesny|nota|dedykacja|dlugi_cytat|poezja_cyt|motto|ramka"> diff --git a/librarian/xslt/book2html.xslt b/librarian/xslt/book2html.xslt index 4b6c72a..b2a028b 100644 --- a/librarian/xslt/book2html.xslt +++ b/librarian/xslt/book2html.xslt @@ -101,6 +101,10 @@
+ +
+
+
diff --git a/librarian/xslt/book2txt.xslt b/librarian/xslt/book2txt.xslt index 36032cf..8589121 100644 --- a/librarian/xslt/book2txt.xslt +++ b/librarian/xslt/book2txt.xslt @@ -40,6 +40,10 @@ + + + + diff --git a/librarian/xslt/config.xml b/librarian/xslt/config.xml index 29905da..9eaa34e 100644 --- a/librarian/xslt/config.xml +++ b/librarian/xslt/config.xml @@ -26,6 +26,7 @@ + @@ -134,6 +135,8 @@ + + diff --git a/scripts/master.css b/scripts/master.css index 0346839..a7cdb00 100644 --- 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; } +div.frame { + border: 1px darkgray solid; +} + hr.spacer { height: 3em; visibility: hidden; diff --git a/tests/files/example-wl.xml b/tests/files/example-wl.xml index 3c4b29b..9950f9d 100644 --- 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)] Cytowany akapit powinien wyglądać jak cytowany akapit. Znaczy, może mieć jakieś dodatkowe wcięcie, jakiś rodzaj wyróżnienia czy coś. +[ramka/akap] + +To jest ramka. W ramce są akapity i inne takie. + [poezja_cyt/strofa] To jest poezja/