sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.62k stars 2.13k forks source link

hidden toctree entries makes chapters in epub unaccessible #868

Open shimizukawa opened 9 years ago

shimizukawa commented 9 years ago

I am making a ebook where I don't want to have links show up in the text so I use the :hidden: tag for toc-tree.

By doing this the chapters are not accessible through the simple forward navigation for eg. in Kindle reader.

You can see it also in Calibre.

I think a reasonable behaviour would be that navigation works as if used without the hidden-tag and that only the links to the included chapters does not show up in the text itself.


shimizukawa commented 9 years ago

From Anonymous on 2012-03-11 08:52:12+00:00

This bug is still in Sphinx 1.1.3

shimizukawa commented 9 years ago

From Jan Ulrich Hasecke on 2012-03-11 09:02:19+00:00

A workaround for those who need hidden toctrees.

  1. Open your ebook in calibre.
  2. Right-click on the title entry in the main window and choose "optimize book"
  3. Select "Explode ePub". It's the upper left button.
  4. The File Manager opens and you see the contents of a temporary folder. Its name ends with "exploded". This is the contents of your ebook.
  5. You can now open the HTML-Files in this folder and simply delete the toctree links which you don't want to have in your ebook.
  6. When you are finished. Push the lower right button: "Create new ePub".
  7. Calibre creates a new ebook, which does not contain the links.