The MK_HTML_HELP procedure, given a list of IDL procedure filenames (.pro files) or the names of directories containing such files, generates a file in HTML (HyperText Markup Language) format that contains documentation for those routines that contain standard IDL documentation headers. The resulting file can then be viewed with a web browser.

MK_HTML_HELP procedure makes a single HTML file that starts with a list of the routines documented in the file. The names of routines in that list are hypertext links to the documentation for those routines. The documentation for each routine is the text of the documentation header copied from the corresponding .pro file—no reformatting is performed.

The documentation headers of the .pro files in question must have the following format:

  • The first line of the documentation block contains only the characters ;+, starting in column 1.
  • The last line of the documentation block contains only the characters ;-, starting in column 1.
  • All other lines in the documentation block contain a ; in column 1.
  • If a line containing the string “NAME:” exists in the documentation block, the contents of the following line are used as the name of the routine being described. If the NAME: field is not present, the name of the source file is used as the routine name.

The file in the examples subdirectory of the IDL distribution contains a template for creating your own documentation headers. Run the example procedure by entering template at the IDL command prompt or view the file in an IDL Editor window by entering .EDIT

This routine is supplied to allow users to make online documentation from their own IDL programs. Although it could be used to create an HTML documentation file from the lib subdirectory of the IDL distribution, we do not recommend doing so. The documentation headers on the files in the lib directory are used for historical purposes—most do not contain the most current or accurate documentation for those routines. The most current documentation for IDL’s built-in and library routines is found in IDL’s online help system (enter ? at the IDL prompt).

This routine is written in the IDL language. Its source code can be found in the file in the lib subdirectory of the IDL distribution.


To generate an HTML help file named myhelp.html from the .pro files in the directory /usr/home/dave/myroutines, use the command:

MK_HTML_HELP, '/usr/home/dave/myroutines', 'myhelp.html'

To generate an HTML help file for all routines in a given directory whose file names contain the word “plot”, use the following commands:

MK_HTML_HELP, plotfiles, 'myplot.html'


MK_HTML_HELP, Sources, Filename [, /STRICT] [, TITLE=string] [, /VERBOSE]



A string array containing the names of IDL procedure files (.pro files) or directories containing such files. The Sources array may contain both individual file and directory names. Each IDL procedure file must have the file extension .pro. Elements of the Sources array that do not have either of these extensions are assumed to be directories.

All .pro files found in Sources are searched for documentation headers. The documentation headers are extracted and saved in HTML format in the file specified by Filename.

Note: More than one documentation block may exist in a single input file.


A string containing the name of the output file to be generated. HTML files are usually saved in files named with a .html or .htm extension.



Set this keyword to force MK_HTML_HELP to adhere strictly to the HTML format by scanning the documentation blocks for HTML reserved characters and replacing them in the output file with the appropriate HTML syntax. HTML reserved characters include < , > , & , and ". By default, this keyword is set to zero to allow for faster processing of the input files.


A string that supples the name to be used as the title of the HTML document. The default is “Extended IDL Help”.


Set this keyword to display informational messages as MK_HTML_HELP generates the HTML file. Normally, MK_HTML_HELP works silently.

Version History



See Also