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 such as Microsoft Internet Explorer or Netscape Navigator.
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 simply 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:
;+, starting in column 1.
;-, starting in column 1.
;in column 1.
template.pro in the
examples subdirectory of the IDL distribution contains a template for creating your own documentation headers.
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
mk_html_help.pro in the
lib subdirectory of the IDL distribution.
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.
.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.
A string containing the name of the output file to be generated. HTML files are usually saved in files named with a
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.
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:
plotfiles=FILE_SEARCH('/usr/home/dave/myroutines/*plot*.pro') MK_HTML_HELP, plotfiles, 'myplot.html'