When TeX typesets a document, it must process the document header, which may contain a large number of \input, \include, and \usepackage statements. Every time the document is typeset, this process is repeated even though large portions of the header did not change.
TeX has a built-in mechanism to speed up this process. It can be instructed to process lines of source and output the result to a "format file." When TeX typesets after that, it can rapidly read the format and then typeset the document. LaTeX is constructed in this manner; the format file is created when TeX is installed on your machine and the command "latex file" tells TeX to read this format and then typeset "file".
When machines were slower, users often created their own format files to speed up typesetting. This is done less often today, but dealing with format files may still be useful. For instance, some organizations create and distribute a format to be used by everyone working on a common project. In this section we'll explain how to use a format file provided by someone else, and how to create a format.
A typical format file has extension "fmt". Suppose a department of the University of Oregon has provided a format "uo.fmt". To use this format, follow the steps below:
This completes the installation. The next time you start TeXShop, the pulldown menu beside the typeset button on the Source Window Toolbar will list "Oregon" as an option. Choose this to typeset using the uo.fmt format. If you want this typesetting method to be the default, go to TeXShop preferences under the Typesetting tab, and in the Default Command box select "Command Listed Below" and fill in the edit box with the word Oregon.
It is also possible to select the Oregon format for a particular document without changing the typesetting option. To do that, add the following line to the top of the source file:
Then uo.fmt will be used for that document regardless of the typesetting option chosen.
The above instructions assume you have a format for pdflatex. You can also make formats for plain tex; in that case change "pdflatex" to "pdftex" in the engine file.
It is also possible to use formats when you are typesetting with tex + ghostscript. TeXShop assumes that an engine file contains one or more command line instructions and ultimately produces a pdf file. So the engine file must contain the commands which convert the dvi file to a pdf file. Here is a typical engine file for uo.fmt in that case:
Format files contain the internal binary representation of typeset lines of source. This representation depends on the processor and particular TeX implementation. Thus it is rarely possible to use a format file from someone else unless that person has the same machine and TeX installation that you do.
However, it is common for organizations to distribute the source lines needed to construct a format. In that case you'll be told to make the format using "initTeX". For example, suppose this source text is "uo.tex". To make the format, open Apple's Terminal program and change to the directory containing the source for the format. Then type
You will get a ** prompt. Type the following line at the prompt
and press return. The format file will be created. At the end you may have to issue a "\dump" command if the format source doesn't contain it. This will produce the required "uo.fmt".
You might like to try this with the follow "uo.tex" file: