Reproduce Mathworks style documentation

12 visualizaciones (últimos 30 días)
Marc Youcef
Marc Youcef el 5 de Abr. de 2020
Respondida: Dario Wanek el 9 de Jul. de 2021
I am trying to find the best way to document my code (which I did not package in a toolbox).
I have built multiple classes and added some documenting lines in comments. When I do :
doc myclass
I get my class documentation but I am missing lots of things like input types of methods, properties types, examples, input range choices not in html format I could export,... All those information that you can usually find in a JSON signature function file:
I understand then that you can write your own html, according what I read here : https://nl.mathworks.com/help/matlab/matlab_prog/display-custom-documentation.html, when using this, I am missing all above advantages on the structred information on class objects that are contained in
doc myclass
I am somehow needing something that can mix both. I am interested in something similar to the Mathworks style documentation:
You have an html format for the same information you would have from command "doc myclass":
And when you click on a method, you get the detailed documentation with examples, inputs type descriptions ...:
  • in an html format so you could host it somewhere or share it outside Matlab
If I do my own documentation in livescript format and export to html, I am loosing all advantages of the in code documentation structure that you get using the command "doc myclass". And if I document only my code with in code documentation comments, I am very limited in term of possibilites to make it look as what you see above.
In conclusion, is wathworks style documentation only limited to them? Or they use tools that we can use as well? In live script editor I can't build drill downs like what you see above, line section separator, ... Publishing code is not publishing the content of the command "doc myclass".
What is important for me is that you can share such documentation outside the matlab environment because people do not necessarly have Matlab to consult what you propose.
I checked out with Doxygen and Sphinx, but I would highly prefer writing in Live editor and leveraging what MATLAB already has than using docstrings...
Thanks.

Respuestas (1)

Dario Wanek
Dario Wanek el 9 de Jul. de 2021
That would be an essential feture!
Is an improvement planned by Mathworks to support the programmers?

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by