|
Document 124
How to create a new format file
Version: 2.5 - Scientific WorkPlace & Scientific Word
The LaTeX format file supplied with SW contains a precompiled image of all the
LaTeX commands, the hyphenation patterns, and the .tfm information for
preloaded fonts.
Our current latex.fmt file contains all of the hyphenation patterns that work
with our version of LaTeX2e, which is the June 1995 release. Most users need
only one hyphenation pattern, but we added the most common ones so users are
less likely to need to create a new format file. The latex.fmt file also
contains information about dc fonts, which can be the source of problems when
DVI files are sent to UNIX LaTeX systems that don't have the fonts referenced
by the DVI file.
You may need to create a new latex.fmt file if you want to
-
have LaTeX load and run faster
-
increase the portability of your documents by creating DVI files that use OT1
encoding instead of T1 encoding
-
add or remove a hyphenation pattern to your SW installation, or
-
update to a newer version of LaTeX.
First we present the steps we followed to create the latex.fmt file that
exists on our version 2.5 CD, then we explain how you can modify the file to
suit your specific needs.
How we created the latex.fmt file
-
Create a separate directory, which we refer to as fmtdir.
-
Download files:
-
From the version 2.5 CD-ROM, copy all the files from the
/ctan/macros/latex/unpacked directory to fmtdir.
-
From Windows Explorer, make sure that all of the files are marked as
Read/Write:
-
Select all of the files.
-
From the File menu, choose
Properties.
-
Uncheck the box labeled Read-Only.
-
Choose OK.
-
Modify the fonttext.cfg file.
-
In the fmtdir directory, make a copy of the fonttext.ltx file and rename the
copy fonttext.cfg.
-
Using an ASCII editor, modify fonttext.cfg so that the T1 encoding scheme is
the default:
-
Change line that reads \newcommand\encodingdefault{OT1} to read \newcommand\encodingdefault{T1}.
This change causes dc fonts to appear in many documents. Please be aware that
this is undesirable in many cases, such as if you want to transfer your DVI
file to another, older LaTeX system that does not recognize the dc fonts or if
you want to submit your document as a DVI file to a journal that doesn't
accept dc fonts.
-
Save the file.
-
Add hyphenation patterns to the language.dat file:
-
From the version 2.5 CD-ROM, copy all the files from the
/ctan/language/Hyphenat directory to fmtdir. Make sure all the files that are
copied are marked as Read/Write (see above).
-
Copy the file /ctan/Babel/language.dat to fmtdirand make sure it is marked as
Read/Write.
When the .fmt file is created, language.dat file is used to assign various
babel packages to LaTeX hyphenation patterns. The released version of SW
contains 12 such assignments.
-
Using an ASCII editor, edit the language.dat file so that it contains the
following lines:
english ushyph.tex
ukenglish ukhyph.tex
catalan cahyph.tex
danish dkhyph.tex
spanish eshyph.tex
french fhyph.tex
german ghyph31.tex
italian ithyph.tex
latin lahyph.tex
dutch nehyph1.tex
polish pohyph.tex
portuguese pthyph.tex
-
Save the file.
Note
This procedure works because all the other babel files are in the
/sw25/tex/macros/babel directory, which is in SW's LaTeX input file search
path. If you need to update babel, you need to replace the files in this
directory.
-
Remove the ltpatch.ltx file.
This file updates LaTeX to June 1995, patch level 3. The format file on the
2.5 CD-ROM doesn't include this patch.
Create a new latex.fmt file in the fmtdir directory.
-
Start initex.
-
Choose Cancel.
-
From the menu, select Preload=latex.
-
Click Default.
-
From the File menu, choose
Open TeX source file...
-
Change the directory to ftmdir.
-
Enter latex.ltx as the file name.
-
Choose OK to begin the compilation.
If an error occurs during the compilation, press Enter.
-
If you are using Windows 95 or Windows NT, you can easily get rid of two of
the compilation errors. In the /sw25/tex/fonts directory, copy lcircle1.tfm to
lcircle10.tfm and copy lcirclew.tfm to lcirclew10.tfm.
Replace the existing latex.fmt file.
-
In the /sw25/tex/truefmt directory, find the file called latex.fmt and rename
it.
-
Copy the new latex.fmt file from the fmtdir directory to the /sw25/tex/truefmt
directory.
You can vary this procedure to tailor the latex.fmt file to your specific
needs. The instructions that follow are models for removing the hyphenation
patterns you don't need, adding hyphenation patterns not provided with SW, and
excluding dc fonts from the latex.fmt file.
Updating Babel
-
From a CTAN site, you
can download a copy of babel. It can be found in the
/pub/tex/macros/latex/packages/babel directory. You may also need to look in
the /pub/tex/language/hyphenation directory for hyphenation files. There may
be other hyphenation files at other locations on CTAN.
-
If you update Babel, you will need to unpack the files. Follow the
instructions in the instal.txt file. Remember to update the files in
/sw25/tex/macros/babel.
To include only the French hyphenation pattern
-
Instead of adding the lines for all hyphenation patterns to the language.dat
file in the fmtdir directory, add only the line for the French pattern.
-
Comment out any other languages by placing a % at the start of each line that
contains a hyphenation pattern for another language.
The French hyphenation pattern will be used regardless of the language in
which you write.
-
Save the file.
-
Generate a new LaTeX format according to the instructions above.
To include the hyphenation patterns
for French and US English only
-
Instead of adding the lines for all hyphenation patterns to the language.dat
file in the fmtdir directory, add only these two lines:
english ushyph.tex
french fhyph.tex
-
Remove or comment out any remaining languages from the file.
You can now select the hyphenation pattern corresponding to the language you
want to use by adding the babel package for
that language to your document style.
-
Save the file.
-
Generate a new LaTeX format according to the instructions above.
To add a hyphenation pattern not
included with SW
-
Find the language.ltx file in the fmtdir directory.
-
Rename the file language.dat.
-
Add a line for the new hyphenation pattern to the language.dat file. For
example, if you have access to a Swedish hyphenation pattern, you might add a
line that reads swedish swhyph.tex
-
Save the file.
-
Generate a new LaTeX format according to the instructions above.
To exclude dc fonts
-
Using an ASCII editor, open the file called fonttext.cfg in the fmtdir
directory.
-
Change line that reads \newcommand\encodingdefault{T1} to read
\newcommand\encodingdefault{OT1}.
-
Save the file.
-
Generate a new LaTeX format according to the instructions above.
To update LaTeX
-
From a CTAN site, you
can download the most recent version of LaTeX. It can be found in the
/pub/tex/macros/latex/unpacked directory. You may also need files from the
/pub/tex/macros/latex/base directory.
-
Using the instructions above, you can use this new set of files to generate a
new LaTeX format file. You may need to update some files in the
/sw25/tex/macros directory.
Warning
Style Editor styles will probably not work with new
versions of LaTeX.
Revised 04/24/97, 09/10/03
This document was created with Scientific WorkPlace.
|