From: Jan Szejko Date: Tue, 21 Mar 2017 11:13:09 +0000 (+0100) Subject: tabelka for one-page tables X-Git-Tag: 1.7~60 X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/1b45c9a8c92e6ecc21e083dd6ed96ffe01e8728d tabelka for one-page tables --- diff --git a/librarian/pdf.py b/librarian/pdf.py index c8af03b..927b50d 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -18,6 +18,7 @@ from tempfile import mkdtemp, NamedTemporaryFile import re from copy import deepcopy from subprocess import call, PIPE +from itertools import chain from Texml.processor import process from lxml import etree @@ -102,7 +103,7 @@ def fix_tables(doc): if kol.tail is not None: if not kol.tail.strip(): kol.tail = None - for table in doc.iter(tag='tabela'): + for table in chain(doc.iter(tag='tabela'), doc.iter(tag='tabelka')): if table.get('ramka') == '1' or table.get('ramki') == '1': table.set('_format', '|' + 'X|' * len(table[0])) else: diff --git a/librarian/pdf/wl2tex.xslt b/librarian/pdf/wl2tex.xslt index d39dea5..c3054d2 100644 --- a/librarian/pdf/wl2tex.xslt +++ b/librarian/pdf/wl2tex.xslt @@ -472,7 +472,13 @@ 1em - to \textwidth + + + + longtabu + tabu + + to \textwidth @@ -484,7 +490,7 @@ - + 1em