IDLdoc is a tool to generate documentation for IDL code. The generated documentation has been traditionally been HTML web pages, but with IDLdoc 2.0 the documentation can easily be capatible with the IDL Assistant or (with a bit more work) any text file type such as LaTeX, XML, Docbook, etc. Examples of IDLdoc output are my published library and demos. Special comments understood by IDLdoc can document specific characteristics of your code, but IDLdoc can produce (at least somewhat) useful output of nearly any IDL code.

Steps to document your library with minimal work

You can customize the output of IDLdoc quite a bit, but if you just want the basics without much work, try:

  1. Download IDLdoc 2.0.
  2. Unzip IDLdoc into a directory in your path.
  3. If your library is in libdir then use the command:
idldoc, root=libdir, output=docdir

The directory libdir is the path to the root directory of your library and docdir is the path to the documentation to be produced (the directory will be created if it doesn’t exist).

Even if you haven’t documented your code at all (much less with special IDLdoc tags), this will still produce a browseable, searchable set of web pages that document the routine names and parameters for your library.

If you have comments before your routines in the standard format (starting with a ;+ line and ending with a ;- line), IDLdoc will use them for the comments for the routine. Using the PREFORMAT to IDLDOC might produce better looking results if you have lined your comments up vertically in any way.

After producing your documentation, go todocdir and bring up index.html in your favorite browser to see the results. For more information, see the “Help” link in the navigation bar near the top of the page, the file idldoc-help.html in the docs directory of the IDLdoc distribution, or stayed tuned to this site for more articles. Next up: how to add special “tags” to your comments that give IDLdoc more specific information.