Desktop Tools and Development Environment |
Adding Your Own Help Files in the Help Browser
If you offer a toolbox or a collection of M-files to other users, you can include HTML help files for your toolbox and provide access to them from the MATLAB Help browser.
In summary, the Help browser determines what information to display using info.xml
files that reside on the search path or in the current directory. You create an info.xml
file for your toolbox, which includes a pointer to your HTML help files. The term toolbox is used here for convenience, but the same concept applies to a blockset or any name you give to your M-file collection.
If you also want your toolbox to appear on the Start button, put the Help browser and Start button information into a single info.xml
file (see Adding Your Own Toolboxes to the Start Button). The example presented here assumes you want your toolbox to appear in the Help browser but not in the Start button.
You can view and modify the files for this example, which are located in matlab/help/techdoc/matlab_env/examples
. They add help for the SpecSim (Example) Toolbox. Copy the examples
directory to a new location to which you have write access, and then add the new examples
directory to the search path.
info.xml
file in a directory that is on the search path or in the current directory. For this example, you can open the example file, helpinfo.xml
, and save it as info.xml
to use it as the basis for this example.
info.xml
file add the SpecSim (Example) help to the Help browser:
<productinfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="optional"> <?xml-stylesheet type="text/xsl"href="optional"?> <matlabrelease>14</matlabrelease> <name>SpecSim (Example)</name> <type>toolbox</type> <icon>$toolbox/matlab/icons/book_mat.gif<icon> <help_location>../examples</help_location> </productinfo>
XML Tag |
Description |
Value in Example |
Notes |
---|---|---|---|
<matlabrelease> |
not used |
14 |
MATLAB release. |
<name> |
Title of toolbox |
SpecSim (Example) |
The name of your toolbox as it will appear in the Help browser. |
<type> |
matlab |
toolbox |
Determines where the toolbox is located in the Help browser Contents pane. Types are presented in the order shown here, with matlab at the top and other at the bottom of the contents. Within a type, items are presented alphabetically. For the example, SpecSim will appear with other toolboxes. |
<icon> |
Icon in Help Contents pane |
$toolbox/matlab/ |
Use standard icons provided with MATLAB, as in this example, or use your own. This value uses a relative pathname: $toolbox is the matlab/toolbox directory. |
<help_location> |
Location of help files |
../examples |
Location of HTML help files you provide for your toolbox. You can specify a relative path, that is, relative to the location of the info.xml file. |
<list> |
Entries for Start button |
None |
If you also want your toolbox to appear in the Start button, add at least one listitem . For details, see Adding Your Own Toolboxes to the Start Button. |
help_location
in the info.xml
file.info.xml
files for MathWorks products:
Adding Your Own Toolboxes to the Start Button | Adding Your Own Demos |
© 1994-2005 The MathWorks, Inc.