Closed andreasdoll closed 4 years ago
Hi. I haven't used sphinx-apidoc
myself, so I'm not sure if it's compatible with the MATLAB sources. Can you show the output of the call to sphinx-apidoc
.
Alternatively, provide a minimal file structure in a zip-file, then I'll look at it.
Hi,
I'm having a similar issue though I want to generate documentation for Matlab-code only.
sphinx-apidoc
generates a list of all necessary toc-entries in source/modules.rst (assuming you split build and source during set-up of sphinx-quickstart).
For python code, if you assume I only have a main.py file and one module the source/modules.rst after running sphinx-apidoc looks like this:
.. toctree::
:maxdepth: 4
main
test_module
And the files main.rst
and test_module.rst
are created as well.
How do you do this for Matlab-code?
The output for the sphinx-apidoc
call is Creating file source\modules.rst.
but this file only contains
my_project
====================
.. toctree::
:maxdepth: 4
I am aware this is not really a bug but more a question about usage but I am new to sphinx and could not find any answers anywhere. Any help would be greatly appreciated 😉
I just tried sphinx-apidoc
, and reading the documentation, it's clear it's only for Python source files.
If you need help writing the rst-files for Matlab source, try looking at the example code https://github.com/joeced/sphinx-docs-matlab-example-1, or post another issue.
First of all, thanks to @joeced for putting the effort into creating sphinx for MATLAB domain. I just wanted to share a similar experience with sphinx-apidoc
. I also think it can be extremely helpful to have sphinx-apidoc
working for MATLAB codes. If you think it makes sense, I'll create a new issue (for a new feature).
That's quite ok with me. Will you post the issue on the sphinx-apidoc
board?
Sorry for the late reply, but thanks @joeced for investigating the issue!
Hello,
I want to document python and Matlab code together using autodoc, but I'm having trouble getting sphinx to work with Matlab at all. I suppose there is an obvious mistake from my side, but I cannot pinpoint it.
My structure is as follows:
Code is located at:
Documentation and documentation config is located at
project/docs
, and in there I have (I give only the relevant parts):Now when I run
the documentation for the python file is generated, but not for Matlab. I've read on stackoverflow that in
conf.py
I should commentsys.path.insert(0, os.path.abspath('../src'))
, but then neither python nor Matlab documentation is generated.I'm using sphinxcontrib-matlab 0.11.0. Any help welcome!