At Wed, 15 Feb 2012 09:35:37 -0800 (PST), rolmei wrote: > > Hi Erik, > you are setting the hidden attribute on the root toc entry? > Then, indeed, the navMap element in toc.ncx is empty and useless. > My use case was to hide only the toc in non-root toc entries.
Hi Roland, Thank you for your response! My primary reason for worrying about this is that I would like to be able to build epubs that do not have a table of contents in the main text, but that instead use a ereaders built-in navigation system, features which exist on all ereaders that I know of. I think that hidden toctrees are the right feature to use for this, but I could be wrong. I should note that I am using a custom theme that does not contain any navigation links at all. Here are the results of my test, using your patch. I created a test document with a root toctree entry and 2 child toctrees, each with a single document beneath them. (I can supply these files if you like.) If I use hidden in the root toctree, I indeed get an empty <navMap>, and an empty <spine> in the content.opf. In calibre I cannot see anything in the generated epub file. Nor can I view any content in the bookworm.oreilly.com, nor on my nook. If I remove hidden from the root toctree, and add it to a single child toctree, I am unable to access the child toctree. I am unable to navigate in any way to the child of the hidden toctree, in calibre viewer, on bookworm.oreilly.com, and on my nook. I don’t think this is correct behavior, because according to the sphinx docs: This will still notify Sphinx of the document hierarchy, but not insert links into the document at the location of the directive – this makes sense if you intend to insert these links yourself, in a different style, or in the HTML sidebar. [1] I think that the <spine> element of the content.opf or the toc.ncx file should be considered like an HTML sidebar. 1. http://sphinx.pocoo.org/concepts.html#the-toc-tree best, Erik
Sent from my free software system <http://fsf.org/>.
-- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.