How can I create one help document from Contents.m and all its linked classes, properties and methods?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Ravi
il 6 Dic 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 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!