M2HTML

Documentation System for MATLAB in HTML

M2HTML: Documentation System for MATLAB in HTML

M2HTML is a powerful tool to automatically generate HTML documentation of your MATLAB M-files. Its aim is to be a successor of the Perl script MAT2HTML from J.C. Kantor, including new features.

This toolbox includes the Template toolbox, thus allowing for a full customization of the output layout. It also uses the syntax highlighting engine from Highlight.m.

M2HTML Features

Here is a list of some features of M2HTML:

  • Output documentation in on-line format (HTML),
  • Parses standard MATLAB code (do not need a specific syntax for comments),
  • Entirely written in MATLAB so it should work on every platform where MATLAB works (no Perl, bash, C/C++)
  • Uses HTML templates for full output layout customization (frame version available),
  • Source code is syntax highlighted for ease of reading,
  • Finds dependencies between functions and generates a dependency graph (using the dot tool of GraphViz),
  • Automatic cross-referencing of functions and subfunctions with their definition in the source code,
  • Extracts and displays Synopsis, H1 line and help for each MATLAB function,
  • Line numbering in source code,
  • Can generate a TODO list,
  • Walks recursively in directories if requested,
  • Identifies MEX-files and indicates for which platform they are compiled,
  • Documentation can be transfered to another location or machine, without regenerating the documentation,
  • Can handle huge toolboxes (all Mathworks toolboxes at once for example, but go and take a coffee during the parsing...),
  • and many small details that make the difference:

M2HTML Tutorial & FAQ

A tutorial and a FAQ (Frequently Asked Questions) are also available.

Examples of use

Here is a list of some users of M2HTML for their MATLAB Toolbox:

Please email me if you use M2HTML and agree to be added to this list.