This question is inspired by the Mayavi documentation, which has nice section breaks with the name of the function being described between each module member.
My .rst
right now just looks like:
SQLAlchemy Tables
**********************************
.. automodule:: ExperimentOrganizer.table_def
:members:
(With all of the documentation formatted text in the module itself.)
Is there a simple way to indicate that I'd like to have section headers inserted between each member in :members:
? If not, how did the Mayavi folks do it?
Can the Sphinx "automodule" be told to automatically insert section breaks between members?
No. There is no magic option to automodule
or something like that. If you want section headers then you'll have to add them yourself (perhaps by using a script) to the reST source. See also the answer to this similar question: Sphinx customizing autoclass output.
The Mayavi documentation that you refer to is not created with autodoc. The functions are documented using the function
directive (not autofunction
). Click on "Show Source" to see the reST markup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With