(Unrelated to my other question from today...)
I apologize if this has been asked before - I'm unsure what terminology to
use to describe this issue. It's relatively minor, but would be nice to
figure out.
I am using Sphinx 1.8.2 within a Canopy environment (running Python 3.5.2)
and the readthedocs theme, generating HTML output using 'make html'. I have
a pretty basic index.rst (containing toctree) and import a single .rst file
which contains multiple 'Chapters' (let's call it manual.rst). Chapter 1
and 4 contain sections, while 2 and 3 do not. In my conf.py, I have added
(among other things) the following:
html_theme = 'sphinx_rtd_theme'
html_theme_options = {'collapse_navigation': False}
using_rtd_theme = True
This gives me what I want from the TOC on the left hand side on both
index.html and the manual.html output. Chapters 1 and 4 show an expandable
TOC element and navigate to the correct part of the document.
However, there is some unusual behavior when navigating from index.html to
manual.html. Specifically, no matter what TOC element I select from within
index.html, when I arrive at manual.html it shows Chapter 1 expanded. This
can be a little disconcerting, as I may navigate to Chapter 2 or 3 (which
can't expand) or to Chapter 4 (which can expand, but isn't expanded).
Navigating within manual.html works and expands the TOC as expected.
Now, my best guess is that this is happening because manual.rst has these
Chapter headings at the highest level. This means that all of the
'Chapters' end up on a single 'page' in the output, and the HTML title is
the title of Chapter 1 (even if you end up in Chapter 4). This also seems
to strip the the section id from Chapter 1 during the rst > html
translation, as navigation to the top of Chapter 1 uses "manual.html#",
instead of something like "manual.html#chapter1".
I can foresee two fixes right now but have problems with both.
#1. Adding a 'title' heading above chapters. However, this would be an
extra superfluous level of TOC tree, which is a problem when my document
already has subsubsubsubsections! (Working on that too)
#2. Splitting each chapter into a separate .rst. However, there are a
number of internal references inside tables which would need to be
refactored (just manual labour, really).
I think an ideal solution would be for each chapter to have a separate HTML
page, but I'm not sure if there is a way to do that except for #2 above.
Does the Sphinx community have any other thoughts or ideas? Thanks in
advance!
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.