Hey Gang,

I'm having a bit of trouble figuring out how to set up some 
clickable/collapsible definitions.  I found some great information here: 
https://stackoverflow.com/questions/2454577/sphinx-restructuredtext-show-hide-code-snippets
 on 
how to add collapsible sections in the html output by sphinx, but I can't 
quite get things how I'd like them.  I'm using the combo of 
_templates/page.html and _static/custom.css to build on the container 
directive as shown in the answer by pbauer in the stack overflow link.  The 
problem, is that I'd like part of the autofunction:: output to appear in 
the collapsible header, and the actual docstring to appear as the 
collapsible section content.  Does anyone know of an extension which will 
do something like this?

Example - currently I have .rst files with a section like this:

.. container:: toggle

    .. container:: heading

        ManualHeaderText

    .. autofunction:: my.module.function

What I would like is something like this:

.. container:: toggle

    .. container:: heading

        ..auto_function_signature_only:: my.module.function

    .. auto_function_docstring_content:: my.module.function

Does anyone know how to make this happen?  I think my docs would be a heck 
of a lot more usable if I could set it up so that only the function 
signatures were visible by default, and clicking on them yielded the 
additional content.

A pre-emptive thank you for any help or advice!

Best,
Steve O'Neill

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/164b2e58-2e64-45c0-9bc8-aaf731d6c324%40googlegroups.com.

Reply via email to