sphinx-contrib / matlabdomain

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

Lists of return arguments like the inputs arguments. #70

Closed dullin closed 6 years ago

dullin commented 6 years ago

MATLAB supports the return of multiple arguments but the sphinx doc by default only cares about 1 return argument.

Is it possible to have the same functionality for the return arguments as the input arguments have right now (be able to create a liste of arguments)?

dullin commented 6 years ago

As an added bonus, the function definition could have the outputs listed with the function name and parameters.

joeced commented 6 years ago

As you have noticed, return arguments are documented as a list of return values. Nothing hinders you from writing extended docstring documentation. I typically document MATLAB on conjuction with Napoleon, so I so no reason for adding these feature yet.

ashkanpakzad commented 2 years ago

Loving the ability to document my matlab project using sphinx, great library!

New to sphinx and running into this problem myself, using napoleon with google style docstrings. just to add, only work around I could I find was to do something like this for a function that returns varargout for example.

% Returns:
%   3 items
%
%   - **requiredarg** (:attr:`scalar`): desc
%   - **optionalarg** (:attr:`vector`): desc
%   - **optionalarg** (:attr:`vector`): desc
joeced commented 2 years ago

Usually I will just write a text message or as you do use a list. I don't think it is a big issue.