How can I create one help document from Contents.m and all its linked classes, properties and methods?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have written a package with roundabout 10 class files which I have documented quite well.
Now I would like to create one singular html file, where the content of the Contens.m file is the table of contents, followed by a section for each class, with subsections with each method.
The helpwin command on Contents.m already provides a view on multiple subpages, but I need it all in one html page, so that I can publish it in our intranet.
0 comentarios
Respuestas (1)
Ravi
el 6 de Dic. de 2023
Hi Grzegorz Lippe,
I assume you want a single HTML page that includes all documentation for all your classes and methods present inside the classes.
A potential solution would be to use the “publish” function. In the Contents.m file, provide information about every class and method present inside the respective class.
Consider this example where there is only one class file “Arithmetic.m” with only one method “add”, that adds two numbers and returns the result.
%% My MATLAB Package
% This MATLAB package contains classes for basic arithmetic operations.
%% Table of Contents
% * <#Arithmetic Arithmetic>
%% Arithmetic
% This class contains methods for basic arithmetic operations.
%
% * <#add add>
%
% <#add add> - This method adds two numbers and returns the sum
My Contents.m file would look like this;
After completing the Contents.m file, run publish command as follows:
publish('Contents.m', 'format', 'html', 'outputDir', 'output');
This creates a HTML page with documentation inside a directory named “output”.
To learn more about the publish function, please refer to the attached documentation:
Hope this solution resolves the issue you are facing.
Thanks,
Ravi Chandra
0 comentarios
Ver también
Categorías
Más información sobre Get Started with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!