Steps to Reproduce: 1. Type in two paragraphs with Heading 1 and Heading 2 styles. 2. Export as EPUB. 3. Open the EPUB file in your epub reader which supports outline. Current Behaviour: Only Heading 1 is shown in the epub reader outline. Expected: All the outline styles such as H1, H2... are correctly exported to the epub file so that the epub reader can show them as outline. Version: 6.0.0.0.beta1 Build ID:97471ab4eb4db4c487195658631696bb3238656c CPU 线程:4; 操作系统:Linux 4.13; UI 渲染:默认; VCL: gtk2; Locale: zh-CN (zh_CN.UTF-8); Calc: group threaded
I conform it. I used a document with for different levels of headings. Only the Heading 1 was shown in the outline. When I create a PDF-Document (as a tagged PDF), all headings appear in the outline. Version: 6.0.0.0.beta1 (x64) Build ID: 97471ab4eb4db4c487195658631696bb3238656c CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: de-DE (de_DE); Calc: group threaded
Can you provide a sample EPUB that has this feature? Our current table-of-contents lists the XHTML files inside the EPUB, and we split the XHTML files on heading 1 paragraphs. So listing heading2, etc. in the table-of-contents would either require some kind of link not only to the XHTML file, but also a bookmark inside that file, or would mean more split (even on heading 2, etc), which is also unwanted. So the first step here would be to find out what EPUB markup is desired to have this.
These are very good epub3 samples: http://idpf.github.io/epub3-samples/30/samples.html Among these, the 2nd one, "Children's Literature", seems to have a multi-level TOC. The source codes for this epub can be found at: https://github.com/IDPF/epub3-samples/tree/master/30/childrens-literature/EPUB I did a brief analysis of the toc.ncx, and find that the implementation is simple: (i.e., navPoint inside navPoint) <navPoint id="np-319"> <navLabel> <text>190 A FOUR-LEAVED CLOVER</text> </navLabel> <content src="s04.xhtml#pgepubid00503"/> <navPoint id="d1e54"> <navLabel> <text> I. The Rabbi and the Diadem </text> </navLabel> <content src="s04.xhtml#pgepubid99001"/> </navPoint> <navPoint id="d1e60"> <navLabel> <text> II. Friendship </text> </navLabel> <content src="s04.xhtml#pgepubid99002"/> </navPoint> <navPoint id="d1e66"> <navLabel> <text> III. True Charity </text> </navLabel> <content src="s04.xhtml#pgepubid99003"/> </navPoint> <navPoint id="d1e72"> <navLabel> <text> IV. An Eastern Garden </text> </navLabel> <content src="s04.xhtml#pgepubid99004"/> </navPoint> </navPoint> Also, you do not need to separate the sub-sections. Set a "name=pgepubid99001" in the target heading and use sth like src="s04.xhtml#pgepubid99001" in the TOC.
And here is a link which describes "Transforming NCX into EPUB 3 Navigation Documents": https://www.safaribooksonline.com/blog/2011/06/14/ncx-into-epub3/
(In reply to Miklos Vajna from comment #2) > Can you provide a sample EPUB that has this feature? I bought some EPUBs with this feature, but of course I can't add them here because of the copyright.
OK, the markup seems to be relatively clear. Problem is that we have no anchors for headings, so the ToC can't refer to them. One could try to find out how normal in-document ToC manages to have a reference to headings, and then do something similar as part of the EPUB export. And yes, EPUB2 has ncx, EPUB3 has a html5-based ToC document, but sounds like both nicely allow nesting.
I can confirm this bug is still around in 6.1.2.1. Which is a shame because LO otherwise produces nice and clean epubs off doc/odt files. I tried calibre on the doc I was trying to convert and while it did TOC levels 2 and 3 correctly, it messed up the graphics in the process. Is there perhaps something in the calibre code that could inform a way of fixing this in LO?
(In reply to Miklos Vajna from comment #2) > Can you provide a sample EPUB that has this feature? Our current > table-of-contents lists the XHTML files inside the EPUB, and we split the > XHTML files on heading 1 paragraphs. > > So listing heading2, etc. in the table-of-contents would either require some > kind of link not only to the XHTML file, but also a bookmark inside that > file, or would mean more split (even on heading 2, etc), which is also > unwanted. > > So the first step here would be to find out what EPUB markup is desired to > have this. Miklos, this might be a useful way to handle it, they included an id for the desired headers instead of adding bookmarks. With the extension you can also select if you want page breaks at header levels different than 1 or not. <!-- This file was converted to xhtml by Writer2xhtml ver. 1.6.1. See http://writer2latex.sourceforge.net for more info. --><head> <title></title> <link href="../Styles/styles1.css" rel="stylesheet" type="text/css"/> </head> <body dir="ltr"> <h1 id="toc0">Ñsjdna</h1> <p class="Textbody"> </p> <p class="Textbody"> </p> <h2 id="toc1">i<ksjdas</h2> <p class="Textbody"> </p> <h3 id="toc2">i<sjdasd</h3> <p class="Textbody"> </p>
*** Bug 133442 has been marked as a duplicate of this bug. ***
*** Bug 138617 has been marked as a duplicate of this bug. ***