Documentation System for MATLAB in HTML
- Question: With my M-files, the H1 line (Purpose) and the help (Description) are badly extracted.
- Answer: Your M-files don't follow the MATLAB Programming Style Guidelines. To know how to write your M-files headers in a standard way, see:
- Question: I get an error saying Cannot make directory... or Cannot open ... in read/write mode.
- Answer: The path you provided with the 'mfiles' option was either an absolute path (C:\matlab\toolbox\signal) or a relative path
using \..\. Remember that m2html must always be launched one directory above the directory your wanting to generate documentation for.
- Question: I installed GraphViz but the dependency graph generation does not work.
- Answer: dot must be in your system path:
- on Linux, modify $PATH accordingly
- on Windows, modify the environment variable PATH like this:
From the Start-menu open the Control Panel, open 'System' and activate the
panel named 'Extended'. Open the dialog 'Environment Variables'. Select the
variable 'Path' of the panel 'System Variables' and press the 'Modify button.
Then add 'C:\GraphViz\bin' to your current definition of PATH, assuming that
you did install GraphViz into directory 'C:\GraphViz'. Note that the various
paths in PATH have to be separated by a colon. Her is an example how the final
Path should look like: ...;C:\WINNT\System32;...;C:\GraphViz\bin
(Note that this should have been done automatically during GraphViz installation)
- Question: On Windows, m2html failed when copying template files, due to a Thumbs.db file.
- Answer: This file has been generated by Windows and corresponds to a database file containing the small images displayed when you view a folder in "thumbnail" view.
You need to remove it because it cannot be copied, see <http://www.real-knowledge.com/thumbsdb.htm> for details.
- Question: I try to generate a frame version of the documentation but I still obtain a non-frame version.
- Answer: You are trying to generate a frame version (using ..., 'template','frame','index','menu', ..., don't forget the index parameter)
in a directory containing a non-frame version of the documentation. In that case, the 'index.html' file containing the frames is not overwritten and you
do not see the frame version. The solution is to delete a previously generated documentation directory before launching m2html using the frame version
or at least delete the 'index.html' in that directory.
- Question: I would like to create a full dependency graph of my functions, m2html creates one for each separate directory.
- Answer: To build the dependency graph of all your files (by default, it builds a dependency graph for each directory), the solution is:
This dependency graph has been created this way.
- run m2html recursively using these options:
>> m2html(..., 'recursive','on', 'global','on', 'save','on', ...)
This will parse all the files recursively ('recursive'), will look for all dependencies ('global') and will save the parsing in a MAT-file ('save').
- then you should have a 'm2html.mat' file in the output directory that can be used with 'mdot.m' to create the graph you want:
>> !dot -Tpng m2html.dot -o m2html.png
- and then you have your full dependency graph m2html.png.
In the next release of M2HTML, this full dependency graph will be automatically generated if optional parameters 'global' and 'graph' are activated.
- Question: Dependency graph generation fails with an error saying warning, language cmap/png not
recognized, use one of: dot canon plain plain-ext.
- Answer: I guess you are using MATLAB 7. It comes bundled with an old version of GraphViz dot.exe (1.8.10 <11/26/02>) which does not come with libraries for png, jpeg, ...
The same problem migh appear if you are using an older version of MATLAB but have also installed MATLAB 7 on your computer: to check that, type
>> !dot -V from within MATLAB and check the version number.
A solution might be to modify the line in <m2html.m> specifying the executable to lauch dot.exe:
dot_exec = 'dot';
dot_exec = 'C:\PROGRA~1\graphviz\bin\dot.exe'; %with the right location
- Question: I would like m2html to have a search engine, a Graphical User Interface, ...
- Answer: I'm working in these issues. Please contact me if you want a beta version.