LaTeX packages

Besides the packages that are included in the "base distribution" of LaTeX, there are many more available in various places. Some examples of packages that we have used are the amsmath package, the graphics packages epsf, epsfig and graphix, and the article document class. These are part of the base distribution. There are other classes in the base distribution, such as the letter class, book class and report class. For example, if you want to read the electronic preprints of physics papers written in LaTeX and available on the Web (for example, at Los Alamos ) you will have to use the revtex package. We have a copy installed on clam, crab and carp, but if you wanted to use it somewhere else, you would have to get a copy and install it. Similarly, if you want to submit a review to Mathematical Reviews, you will need special packages for that purpose.

In principle, any user can extend LaTeX. We have seen some very small examples of this with the custom commands. The packages are simply more sophisticated extensions of the language. Many people have written such packages and contributed their work to the Comprehensive TeX Archive Network (CTAN). There you can find many packages. We will look at some examples of how to locate, download, install, and use a few of these packages. For the rest of this class, I would like you to go through the activities described on a Web page created by Prof. Harold Boas at Texas A&M University

In case there is a problem with connecting to the Texas A&M web-site, try a local copy of the page.

You should create a subdirectory, say "macros/" of your root directory, and then make it available to LaTeX by adding a line to your .cshrc file (the resource file for the C-shell) After backing up the file .cshrc you can add the following line, but be sure to include the "." just before the ":".

    setenv TEXINPUTS .:~/macros//:/usr/local/lib/tex/macros//
This line instructs TeX to look for packages first in the current directory (indicated by the dot), then in your directory ~/macros/ and then the system directory. The double slash insures that TeX will look into subdirectories. After you have saved your new .cshrc file, you can put it into effect by typing
     source .cshrc
Now you should be able to use the packages that you download (provided, of course, that they are either in the current directory or in your new macros/ directory).

We have seen that LaTeX allows you to define your own commands. Actually, a user can extend LaTeX in various other ways, for example, by creating new environments, new symbols, and even providing bookkeeping on some aspects of a document. This is possible because LaTeX is a programming language though not a sophisticated one. Examples of things that can be done include creating new packages (like amsmath) and new document classes.

Of course, most of us don't have the necessary expertise to write a LaTeX package or a new LaTeX document class, but even those who do have sufficient expertise can take advantage of the work contributed by users to the Comprehensive TeX Archive Network (CTAN). A good place to start to search for a package is TeX and LaTeX Catalogue Packages and tools, mostly available on CTAN. (about 1 Meg).

Let's go to the alphabetical index and look for files that have names starting with the string "exam".


email to:Martin Karel