How can I create one help document from Contents.m and all its linked classes, properties and methods?
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Ravi
2023년 12월 6일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!