Search code examples
htmlpython-sphinxchmhtml-help-workshop

Sphinx + HTML Help Workshop : separate page for each section


After building *.rst files with Sphinx, I am creating a CHM file with the HTML Help Workshop.

My index.rst file so far:

.. toctree::
   :maxdepth: 2

   _static/presentation_designer/feedback
   _static/presentation_designer/test

I have two *.rst files which are under the 'presentation_designer' folder. Each feedback.rst and test.rst file has its own separate page in the CHM file.

feedback.rst

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Presentation Designer**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
**Leave Feedback**
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Please feel free to leave feedback.

test.rst

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Presentation Designer**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
**test**
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Please test and click ‘submit’.

But I've got the result as shown in the attached file.

How can I put them (Test and Feedback pages) under "Presentation Designer" together?

section issue


Solution

  • You know, the Table of Contents (TOC) in a CHM's navigation pane is derived from your restructured text file and normally depending on the title, subtitle und subsubtitle.

    Please have a look at the following screenshot (navigation pane) for your special requirements and the source files below. The resulting CHM I compiled using FAR HTML but using Microsoft's HTML Help Workshop is working for this too.

    Help Viewer with navigation pane and content.

    index.rst:

    Welcome - CHM Sphinx Demo
    =========================
    
    Contents:
    
    .. toctree::
       :maxdepth: 2
    
       first-steps/overview
       _static/presentation-designer/_presentation-designer
    

    overview.rst:

    ********
    Overview
    ********
    
    About FAR HTML
    ##############
    ... some text
    
    Features
    ########
    ... some text
    
    Help Authoring:
    ***************
    ... some text
    

    _presentation-designer.rst:

    Presentation Designer
    =====================
    
    .. toctree::
    
       coaching
       feedback
    

    coaching.rst:

    .. toctree:: :maxdepth: 1

    Coaching conversations
    ######################
    
    Feedback should not be a one-way street.
    

    feedback.rst:

    .. toctree::
       :maxdepth: 1
    
    Real-time Feedback
    ##################
    
    Feedback happens less than it should and often comes too late.