From c87453a1da79443d74132398e7dd1aaa83140fee Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 4 Aug 2017 17:16:31 +0200 Subject: [PATCH 1/1] allow strofa inside table + fix table border in html/epub + fix empty verses in epub --- librarian/epub.py | 2 ++ librarian/epub/style.css | 3 ++- librarian/epub/xsltScheme.xsl | 15 ++++++++------- librarian/fb2/poems.xslt | 4 ++++ librarian/pdf/wl2tex.xslt | 7 +++++++ librarian/xslt/book2html.xslt | 13 ++++++++++++- 6 files changed, 35 insertions(+), 9 deletions(-) diff --git a/librarian/epub.py b/librarian/epub.py index 3e9056c..95e65f1 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -201,6 +201,8 @@ class Stanza(object): if not text: return for i, verse_text in enumerate(re.split(r"/\s*\n", text)): + if not verse_text.strip(): + continue if i: self.open_normal_verse() verse = self.get_open_verse() diff --git a/librarian/epub/style.css b/librarian/epub/style.css index 78ed5bc..e40c754 100644 --- a/librarian/epub/style.css +++ b/librarian/epub/style.css @@ -371,7 +371,8 @@ p.footer { table { border-collapse: collapse; + width: 100%; } -td { +table.border th, table.border td { border: 1px solid black; } diff --git a/librarian/epub/xsltScheme.xsl b/librarian/epub/xsltScheme.xsl index 3b7036c..e04cb9d 100644 --- a/librarian/epub/xsltScheme.xsl +++ b/librarian/epub/xsltScheme.xsl @@ -73,10 +73,6 @@ - - - - @@ -329,9 +325,14 @@ - - -
+ + +
+
+ +
+
+
diff --git a/librarian/fb2/poems.xslt b/librarian/fb2/poems.xslt index 82e164f..257795b 100644 --- a/librarian/fb2/poems.xslt +++ b/librarian/fb2/poems.xslt @@ -29,6 +29,10 @@ + + + + diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index 4c8be32..85375a2 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -306,6 +306,13 @@ + + + + + + + diff --git a/librarian/xslt/book2html.xslt b/librarian/xslt/book2html.xslt index c4757e1..4b6c72a 100644 --- a/librarian/xslt/book2html.xslt +++ b/librarian/xslt/book2html.xslt @@ -193,6 +193,10 @@

+ + + +
@@ -256,7 +260,14 @@ -
+ + +
+
+ +
+
+
-- 2.20.1