diff --git a/src/calibre/ebooks/oeb/transforms/htmltoc.py b/src/calibre/ebooks/oeb/transforms/htmltoc.py index 0e1b2b5f10..c7a0cfce94 100644 --- a/src/calibre/ebooks/oeb/transforms/htmltoc.py +++ b/src/calibre/ebooks/oeb/transforms/htmltoc.py @@ -102,7 +102,7 @@ class HTMLTOCAdder(object): href=css_href) body = element(contents, XHTML('body'), attrib={'class': 'calibre_toc'}) - h1 = element(body, XHTML('h1'), + h1 = element(body, XHTML('h2'), attrib={'class': 'calibre_toc_header'}) h1.text = title self.add_toc_level(body, oeb.toc) diff --git a/src/calibre/ebooks/pdf/render/toc.py b/src/calibre/ebooks/pdf/render/toc.py index 6534248d86..f1a812ce6f 100644 --- a/src/calibre/ebooks/pdf/render/toc.py +++ b/src/calibre/ebooks/pdf/render/toc.py @@ -9,7 +9,7 @@ __copyright__ = '2013, Kovid Goyal ' import os from lxml.html import tostring -from lxml.html.builder import (HTML, HEAD, BODY, TABLE, TR, TD, H1, STYLE) +from lxml.html.builder import (HTML, HEAD, BODY, TABLE, TR, TD, H2, STYLE) def convert_node(toc, table, level, pdf): tr = TR( @@ -64,7 +64,7 @@ def toc_as_html(toc, pdf, opts): ) ), BODY( - H1(opts.toc_title or _('Table of Contents')), + H2(opts.toc_title or _('Table of Contents')), TABLE(), ) )