sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
69 stars 45 forks source link

display class members in separate lists w/headings #179

Closed rdzman closed 1 year ago

rdzman commented 1 year ago

As part of the goal of supplying in-source documentation that looks good and works well with both Sphinx and MATLAB's help and doc commands (see #140), it would be a great improvement if we could display class members in separate lists, e.g. for properties and methods, with corresponding headings, similar to the "Property Summary" and "Method Summary" in the MATLAB doc output.

Currently using the :members: option with the autoclass directive results in a single list (with some sorting options) with no headings.

I like the idea you (@joeced) suggested here of using Jinja templates. That seems like the most flexible approach and could work nicely with the existing :members:.

But, I'm also happy to help work on a much simpler option if there is one. I'm thinking of something like adding :properties: and :methods: options for the autoclass directive. Essentially, duplicating the functionality of :members: and adding filtering to skip over members that are not properties and methods, respectively.

rdzman commented 1 year ago

Resolved with #181. Thanks!