Desktop Tools and Development Environment Previous page   Next Page

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.

  1. In the Editor/Debugger, create an 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.
  2. Refresh the Help browser by selecting Start -> Desktop Tools -> View Source Files, and then click Refresh Start Button in the resulting Start Button Configuration Files dialog box.
  3. Open the Help browser to see the sample entries for the SpecSim (Example) Toolbox. Be sure to disable the product filter, or select the SpecSim (Example) Toolbox in the product filter if the product filter is enabled. Use Preferences -> Help to access the product filter.

    Image of Help browser showing the SpecSim (Example) Toolbox selected in the Contents pane and displaying an HTML page of the SpecSim documentation in the display pane.

  1. The contents of the info.xml file add the SpecSim (Example) help to the Help browser:

  1. Put the help files listed in the following table into the directory you specified for help_location in the info.xml file.

    Filename
    Required or Optional
    Description 
    helptoc.xml
    Required
    The file the Help browser needs to display hierarchical entries in the Contents pane for your toolbox. It references your HTML help files. A helptoc.xml file is provided for the example.
    helpindex.xml
    Optional
    Provides entries for the Index pane in the Help browser. View the helpindex.xml file for any MathWorks product you installed to see how you can create a similar file for your own toolbox.
    helpsearch.db
    Optional
    Provides entries for the Search pane in the Help browser. For details on creating this file, contact MathWorks Technical Support.
    HTML help files
    Required
    HTML files containing the help for your toolbox. At least one of these is referenced by helptoc.xml. HMTL files are provided for the example.
  2. Refresh the Help browser by selecting Start -> Desktop Tools -> View Source Files, and then click Refresh Start Button in the dialog box.
  3. For additional examples, see the info.xml files for MathWorks products:
    1. Select Start -> Desktop Tools -> View Source files.
    2. From the resulting Start Button Configuration Files dialog box, select a product.
    3. Click Open to view its info.xml file.

Previous page  Adding Your Own Toolboxes to the Start Button Adding Your Own Demos Next page

© 1994-2005 The MathWorks, Inc.