|
Document 723
LaTeX format files
Version: 4.x & 5.x - Scientific WorkPlace & Scientific
Word
LaTeX format files contain information defining LaTeX hyphenation patterns,
commands, and font metrics (.tfm) files for preloaded fonts. TeX uses format
files to create a precompiled memory image of LaTeX, thus saving compilation
time. Format files are created specifically for each different implementation
of TeX.
The latest version of SWP and SW includes several different LaTeX format files
created for TrueTeX:
-
A standard format file, latex.fmt, based on the standard
LaTeX distribution. It uses OT1 font encoding for DVI files, which encompasses
most but not all of the symbols that appear on the symbol panels and creates
more portable documents than T1 font encoding.
-
A multilingual format file, latex_ml.fmt, the program
default. It adds hyphenation patterns for several languages: American and
British English, French, German, and New German. The file uses DC fonts and T1
font encoding, which includes all symbols on the symbol panels.
The program also includes two different format files
created for pdfLaTeX.
Creating a new LaTeX format file
If you are very experienced with LaTeX, you may occasionally need to create a
new LaTeX format file for your installation. For example, updating the version
of LaTeX or Babel on your system or adding a
hyphenation pattern for a different language requires a
new format file.
NoteCreating
format files involves working directly with the TeX Formatter and requires a
thorough knowledge of TeX and LaTeX. Changing format files or LaTeX source
files can cause irreparable damage to your installation.
ImportantFor
safety, back up the existing TCITeX\TeX\LaTeX\base directory in your program
installation before you attempt to create a new format file.
The sections below provide instructions for
These instructions reflect how we created the format files for TrueTeX that
are included with the latest version of SWP and SW. If you need to create a
format file for a different TeX implementation, you may need to adapt these
instructions.
Creating a new standard format file (latex.fmt)
If you update the version of LaTeX on your system, you must create a new LaTeX
format file. For safety, back up the existing TCITeX\TeX\LaTeX\base directory
in your program installation before you begin, then follow these steps:
-
Reinstall SWP or SW.
Use the Repair Installation option in the installation program, which ensures
that the default set of files is present.
-
Delete, move, or rename the Babel hyphenation configuration file
TCITeX\TeX\LaTeX\required\babel\hyphen.cfg.
The file isn't used in standard LaTeX.
-
Generate the new format file:
-
Start the TrueTeX Formatter from the SWP or SW program submenu.
-
Choose CANCEL in the open dialog box.
-
Choose the Preload= menu item.
-
Choose Default.
-
From the File menu, choose
Open TeX source file and navigate to the
TCITeX\TeX\LaTeX\base directory.
-
Type latex.ltx and choose
Open.
The Formatter generates the new format file and closes when the process is
complete. The Formatter places two files, latex.fmt and latex.log, in your
TCITeX\TeX\LaTeX\base directory.
-
Rename and move the new files.
-
Rename the new files latex.fmt and latex.log to distinguish them from earlier
format files.
These instructions assume that you rename latex.fmt to
latex_new.fmt and latex.log to
latex_new.log.
-
Move latex_new.fmt and latex_new.log to the TCITeX\truetex directory.
Although TeX doesn't use latex_new.log, the file serves as a history of how
the format file was created. We recommend that you preserve it.
-
Create a formatter entry for the new
format file:
-
From the Typeset menu, choose
Expert Settings, and then choose the
Format Settings tab.
-
Choose Add/Modify.
-
In the Choose TeX format file area at the bottom
of the TeX Formatter dialog box, enter the name of the new format file. Don't
include the .fmt file extension.
-
In the Name for TeX formatter area at the top of
the dialog box, enter a name for the new format as you want it to appear in
the list of available format files.
Choosing a name for the new format preserves the name for your original
format.
-
If you want to change the name of the formatter as it appears in compilation
messages, enter the new name in the Display
appearance box.
-
If the formatter requires the TrueTeX command handler, check
Use TrueTeX command handler.
Note that preinstalled formatters already have correct settings. See the
TrueTeX documentation for more information.
-
If you make an error, choose Revert to original
and enter the settings again.
-
Choose OK.
-
Preview a document and check the .log file to verify that no TeX errors
occurred and the new format is working correctly.
Creating a new multilingual format file (latex_ml.fmt)
If you have updated the version of LaTeX or Babel on your system or customized
the hyphenation patterns in use, you must create a new
LaTeX format file. For safety, back up the existing TCITeX\TeX\LaTeX\base
directory in your program installation before you begin.
-
Reinstall SWP or SW.
Use the Repair Installation option in the installation program, which ensures
that the default set of files is present.
-
Modify the fonttext.cfg file:
-
In the TCITeX\TeX\LaTeX\base directory, copy the fonttext.ltx file and rename
the copy fonttext.cfg.
-
Modify fonttext.cfg so that the T1 encoding scheme is the default:
-
Using an ASCII editor, open the file.
-
Change line that reads
\newcommand\encodingdefault{OT1} to
\newcommand\encodingdefault{T1}
Note that this change causes DC fonts to appear in many documents.
-
Save and close the file.
-
If you are installing a new version of LaTeX, change the file oldDC.ins to
accommodate the DC fonts. If you are using the files provided by a default SWP
or SW installation, skip to the next step.
-
Start the TrueTeX Formatter from the SWP or SW program submenu.
-
Open the file oldDC.ins in the TCITeX\TeX\LaTeX\base directory.
-
Answer yes to all questions about overwriting
files.
-
If you are installing a new version of LaTeX, modify the language.dat file. If
you are using the files provided by a default SWP or SW installation, skip to
the next step.
-
Using an ASCII editor, open the file
TCITeX\TeX\LaTeX\required\babel\language.dat, which preloads hyphenation
patterns into the LaTeX format file.
-
Find these lines in the file:
=USenglish
american ushyphen.tex
english ukhyphen.tex
=UKenglish
=british
french frhyphen.tex
dutch nehyph2.tex
german dehypht.tex
ngerman dehyphn.tex
The lines indicate the default set of hyphenation patterns for Babel.
-
Change american ushyphen.tex to
american ushyph.tex.
-
Change french frhyphen.tex to french
frhyph.tex.
-
Save and close the file.
-
Generate a new format file:
-
Start the TrueTeX Formatter from the SWP or SW program submenu.
-
Choose CANCEL in the open dialog box.
-
Choose the Preload= menu item.
-
Choose Default.
-
From the File menu, choose
Open TeX source file and navigate to the
TCITeX\TeX\LaTeX\base directory.
-
Type latex.ltx and choose
Open.
The Formatter generates the new format file and closes when the process is
complete. The Formatter places two files, latex.fmt and latex.log, in your
TCITeX\TeX\LaTeX\base directory.
-
Rename and move the files.
-
Rename the new files to distinguish them from earlier format files.
These instructions assume that you rename latex.fmt as latex_newml.fmt and
rename latex.log as latex_newml.log.
-
Move latex_newml.fmt and latex_newml.log to the TCITeX\truetex directory.
Although TeX doesn't use latex_newml.log, the file serves as a history of how
the format file was created. We recommend that you preserve it.
-
Create a formatter entry for the new format file:
-
From the Typeset menu, choose
Expert Settings, and then choose the
Format Settings tab.
-
Choose Add/Modify.
-
In the Choose TeX format file area at the bottom
of the TeX Formatter dialog box, enter the name of the new format file. Don't
include the .fmt file extension.
-
In the Name for TeX formatter area at the top of
the dialog box, enter a name for the new format as you want it to appear in
the list of available format files.
Choosing a name for the new format preserves the name for your original
format.
-
If you want to change the name of the formatter as it appears in compilation
messages, enter the new name in the Display
appearance box.
-
If the formatter requires the TrueTeX command handler, check
Use TrueTeX command handler.
Note that preinstalled formatters already have correct settings. See the
TrueTeX documentation for more information.
-
If you make an error, choose Revert to original
and enter the settings again.
-
Choose OK.
-
Preview a document and check the .log file to verify that no TeX errors
occurred and the new format is working correctly.
Added 05/25/06
|