Updated 22 Feb 2022
- .toolboxName - A custom name of your toolbox/folder
- mFolder - total path to your toolbox/folder
- outputFolder - total path to the folder where the documentation should be stored
- excludeFolder - Optional: Exclude one/many folder name(s) of the documentation (exact folder name required, not path)
- .toc - Optional: If empty, the documentation structure will be mirrored from the subfolder / real folder structure. If you want a custom structure, read "Your own toc structure".
- m2docgen focuses on the headers of functions and not on the code. Thus code lines and comment-blocks inside a function will NOT be documented.
- The custom documentation is only visible in the matlab help center if the target export folder is added to the matlab path. m2docgen does this step for you, but it can never hurt to check...
- The conversion of matlab live scripts to html documents is really slow and does not follow the customisation settings, so avoid it when possible.
- This toolbox relies on "%%" to identify heading sections, so use them in the header to segment the documentation site.
- If you want to define a custom page for one of the table of content (TOC) headings, first define the heading in toc structure in the opts. Then create your custom live script and put it somewhere in the source folder. Make sure that the name of the toc heading and the live script name are compatible with matlabs variable naming scheme. Example: The first heading in the TOC structure is defined as "Welcome_to_m2docgen". I created a live script (this one) with the exact same name and put it somewhere in the source folder. If the toc name or file name would include spaces, then the associated file could not be assigned to this landing page.
- The generation of the search database sometimes fails. Go to the folder, where the info.xml is stored, move one folder up, remove the folder and subfolders from the active search path, add it back and then run the script again.
- On that note: Make sure to have m2docgen added to the matlab path before running it.
Nils Böhnisch, Pierre Ollfisch (2021). m2docgen - an automatic documentation toolbox, MATLAB Central File Exchange. Retrieved July 22, 2021.
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
See release notes for this release on GitHub: https://github.com/nilsBoeAc/m2docgen/releases/tag/v2.2
See release notes for this release on GitHub: https://github.com/nilsBoeAc/m2docgen/releases/tag/v2.1
- New License
- change name
- Added "Cite as"