Friday, October 9, 2009

Accessing Package Documentations

LaTeX package authors are awesome, not only because they develop and maintain so many goodies for the convenience of other LaTeX users (especially those of us who aren't that well-versed with TeX), but also because they fully document the usage of their packages. (Well most of them anyway.)

How do you access these documentations and manuals, though? Do you google (or search on CTAN) and download the manuals every time you want to look up the details of user commands in, say, the glossaries package? Occasionally, though, you may find that the manuals you just downloaded are the wrong versions for the package files installed on your system.

Chances are that the documentations are already installed on your system, when you first installed those packages. They're usually located in $TEXMF/doc/tex/latex, or $TEXMF/doc/bibtex for BibTeX-related packages.

There's an easier way to look up a package's documentation than manually navigating the TEXMF trees, though. In TeXLive (that's probably what you have if you're on a *nix or Mac system), type

$ texdoc glossaries (or whatever package you're interested in)

at the shell prompt. Voíla! The documentation for the glossaries package would open automatically for your perusal.

If the file that appears seem like an example file demonstrating a package's functionalities and not the documentation proper, try

$ texdoc --list glossaries


instead. You'll be presented with an interactive list from which you can select the file you want to open.

MikTeX users on Windows can use the command

mthelp glossaries

at the command prompt or from the "Start → Run" dialog instead. A browser window would open, listing possible documentation files associated with the package name you supplied. Click on a link to view the file you're interested in. And if you trust the system enough to hit upon the "main" documentation file at the first try, use

mthelp --view glossaries

instead.

No comments: