wl style for XeLaTeX is now a class. Accepts several parameters affecting output...
[librarian.git] / librarian / epub.py
index c5942a2..bb3123d 100644 (file)
@@ -167,7 +167,7 @@ class TOC(object):
     def add(self, name, part_href, level=0, is_part=True, index=None):
         assert level == 0 or index is None
         if level > 0 and self.children:
     def add(self, name, part_href, level=0, is_part=True, index=None):
         assert level == 0 or index is None
         if level > 0 and self.children:
-            return self.children[-1].add(name, "part%d.html" % part_href, level-1, is_part)
+            return self.children[-1].add(name, part_href, level-1, is_part)
         else:
             t = TOC(name)
             t.part_href = part_href
         else:
             t = TOC(name)
             t.part_href = part_href
@@ -311,7 +311,7 @@ def transform(provider, slug=None, file_path=None, output_file=None, output_dir=
 
         # every input file will have a TOC entry,
         # pointing to starting chunk
 
         # every input file will have a TOC entry,
         # pointing to starting chunk
-        toc = TOC(node_name(input_xml.find('.//'+DCNS('title'))), chunk_counter)
+        toc = TOC(node_name(input_xml.find('.//'+DCNS('title'))), "part%d.html" % chunk_counter)
         chars = set()
         if first:
             # write book title page
         chars = set()
         if first:
             # write book title page