Custom Toolbox Documentation for Nested Namespaces

2 views (last 30 days)
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

Accepted Answer

Trent Gatz
Trent Gatz on 24 Jan 2025
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.

More Answers (0)

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!