Custom Toolbox Documentation for Nested Namespaces

5 次查看(过去 30 天)
I am trying to create a custom toolbox which has multiple, sometimes nested, namespaces. How do I structure my *.mlx help files such that they appear for all functions within the toolbox.
For example, say my toolbox has the form:
└───root
├───+toolbox
│ ├───+subpackage1
│ │ └───+subpackage3
│ │ myfcn.m
│ │
│ └───+subpackage2
└───doc
GettingStarted.mlx
I am able to run
doc toolbox
and recieve the "GettingStarted.mlx"
However, how can I structure documentation such that:
doc toolbox.subpackage1.subpackage2.myfcn
returns a *.mlx for myfcn?
Currently, the output is identical to help toolbox.subpackage1.subpackage2.myfcn
Attempted Solution:
I have tried to add this documentation as follows:
└───root
├───+toolbox
│ ├───+subpackage1
│ │ └───+subpackage3
│ │ myfcn.m
│ │
│ └───+subpackage2
└───doc
│ GettingStarted.mlx
└───toolbox
└───subpackage1
└───subpackage3
myfcn.mlx
However, the deeply nested documentation is not found. If I manually add 'myfcn.mlx' into the package Examples, it shows up in the documentation under the heading 'subpackage3', but this is not my desired behavior. I would like to maintain the entire tree in my documentation.
I have found packages discussing using info.xml & helptoc.xml, but it is not clear how to modify these for this situation. The documentation for these files can be found here: https://www.mathworks.com/help/matlab/matlab_prog/display-custom-documentation.html

采纳的回答

Trent Gatz
Trent Gatz 2025-1-24
use "docsearch" instead of "doc" to show supplemental software.
there may be away to add supplemental software documentation to doc via "builddocsearchdb", but "docsearch" seems to do the same thing without the hassle.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Adding custom doc 的更多信息

标签

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by