X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/ca8319931f449468918067367133ff25f9b19f30..7bd7f505b6420e7667b29d5aa7e6a2e3a2a520bd:/src/librarian/epub.py diff --git a/src/librarian/epub.py b/src/librarian/epub.py index a8c6680..35766b8 100644 --- a/src/librarian/epub.py +++ b/src/librarian/epub.py @@ -327,6 +327,18 @@ def transform_chunk(chunk_xml, chunk_no, annotations, empty=False, ) ) elif element.tag in ('naglowek_podrozdzial', 'naglowek_scena'): + if not toc: + toc.append( + ( + epub.Link( + "part%d.xhtml" % chunk_no, + " ", + "part%d" % chunk_no + ), + [] + ) + ) + subnumber = len(toc[-1][1]) toc[-1][1].append( epub.Link( @@ -553,7 +565,7 @@ def transform(wldoc, verbose=False, style=None, spine = output.spine - functions.reg_mathml_epub(zip) + functions.reg_mathml_epub(output) if os.path.isdir(ilustr_path): ilustr_elements = set(ilustr.get('src')