Code covered by the BSD License  

Highlights from
BetterHelp

4.0

4.0 | 2 ratings Rate this file 6 Downloads (last 30 days) File Size: 133 KB File ID: #41623
image thumbnail

BetterHelp

by

 

03 May 2013 (Updated )

Improves Matlab's help functionality for functions that do not have their own help files.

| Watch this File

File Information
Description

The doc command will display help written for custom functions in the Help Browser. However, the allowed markup is rather limited. According to the official documentation, http://www.mathworks.com/help/matlab/matlab_prog/add-help-for-your-program.html, the only thing you can add is a See Also section. Matlab will also recognize a Note section (and a few others) and will highlight the function name if it is in all caps (or mixed case, if the actual function name is mixed case).

This function provides a modified copy of the undocumented help2html.m function, as well as a few other files to enable slightly more markup functionality, making use of the limited html capabilities of the default help browser.
New features include:
    Additional custom sections
    3 text styles - regular, bold, and code
    Definition style lists
    Doesn't affect files without %CUSTOM_HELP% tag, so other people's formatting is unaffected.
    Style customization using css (by editing helpwin.css)

For BetterHelp to work, the BetterHelp directory containing help2html.m, +myHelpUtils/, and private/ must be on the path. To go back to normal, just delete constructed files or remove the directory from the path.

MathWorks changed the help generation slightly in R2012b, so use BetterHelp2012b if you are running R2012b+, instead of BetterHelp.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Other requirements Should be good for releases back to 2006 or earlier, but not tested. For versions greater than 2012a, use the BetterHelp2012b directory.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
19 May 2013 Matthew

Now works as advertised.

06 May 2013 Michael Ryan

I used the patcher utility because I was leery of providing files that are essentially the code from MathWorks, with only a few lines changed. I can submit the actual patched files if that is allowed/ok.
Could you better specify what didn't work? I was unable to do as much testing as I would have liked to, so any input would be welcome. Thanks for trying it though.

04 May 2013 Matthew

Yes the MATLAB help documentation should be improved. However, this submission didn't work for me.

The use of the patching utility is very strange.

Updates
06 May 2013

Changed makehelp to generate files in BetterHelp directory instead of current directory. Updated description to reflect change.

07 May 2013

Removing mypatcher, makehelp, and patch files and provided original modified files.

08 May 2013

Added version for Matlab R2012b and higher, since the help generation was slightly changed in that version.

10 May 2013

Forgot to fix some private folder in BetterHelp2012b, primarily help2xml.m, which might have caused problems with help for classes. Thanks to Matthew for pointing it out.

13 May 2013

Updated formatting code. Have eased adding custom formatting (see processText in help2html) and fixed some potential formatting bugs. Updated help to reflect changes.

16 May 2013

Fixed bug with incorrect formatting when function and folder share the same name.

17 May 2013

Latest upload had the old private folder in BetterHelp2012b rather than the correct one.

Contact us