Technical Support
Forums and Mailing Lists
Search Mackichan Web

SWP & SW
Version 5/5.5

Installation
Word Processing
Computations
Typesetting
File Issues
Graphics
Exam Builder
Style Editor
Other
Free Updates
Technical Articles

Scientific Notebook
Support Information
Troubleshooting

TeXnology
BibDB
TeXnology links

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

  1. Create a separate directory, which we refer to as fmtdir.

  2. Download files:

    1. From the version 2.5 CD-ROM, copy all the files from the /ctan/macros/latex/unpacked directory to fmtdir.

    2. From Windows Explorer, make sure that all of the files are marked as Read/Write:

      1. Select all of the files.

      2. From the File menu, choose Properties.

      3. Uncheck the box labeled Read-Only.

      4. Choose OK.

  3. Modify the fonttext.cfg file.

    1. In the fmtdir directory, make a copy of the fonttext.ltx file and rename the copy fonttext.cfg.

    2. Using an ASCII editor, modify fonttext.cfg so that the T1 encoding scheme is the default:

      1. 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.

      2. Save the file.

  4. Add hyphenation patterns to the language.dat file:

    1. 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).

    2. 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.

    3. 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

    4. 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.

  5. 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.

  6. Create a new latex.fmt file in the fmtdir directory.

    1. Start initex.

    2. Choose Cancel.

    3. From the menu, select Preload=latex.

    4. Click Default.

    5. From the File menu, choose Open TeX source file...

    6. Change the directory to ftmdir.

    7. Enter latex.ltx as the file name.

    8. Choose OK to begin the compilation.

      If an error occurs during the compilation, press Enter.

    9. 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.

  7. Replace the existing latex.fmt file.

    1. In the /sw25/tex/truefmt directory, find the file called latex.fmt and rename it.

    2. 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

  1. 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.

  2. 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

  1. 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.

  2. 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.

  3. Save the file.

  4. Generate a new LaTeX format according to the instructions above.

To include the hyphenation patterns for French and US English only

  1. 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

  2. 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.

  3. Save the file.

  4. Generate a new LaTeX format according to the instructions above.

To add a hyphenation pattern not included with SW

  1. Find the language.ltx file in the fmtdir directory.

  2. Rename the file language.dat.

  3. 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

  4. Save the file.

  5. Generate a new LaTeX format according to the instructions above.

To exclude dc fonts

  1. Using an ASCII editor, open the file called fonttext.cfg in the fmtdir directory.

  2. Change line that reads \newcommand\encodingdefault{T1} to read \newcommand\encodingdefault{OT1}.

  3. Save the file.

  4. Generate a new LaTeX format according to the instructions above.

To update LaTeX

  1. 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.

  2. 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.



MacKichan Software, Inc. 19689 7th Avenue NE, Suite 183 #238 Poulsbo, WA 98370
Phone: 360-394-6033 Toll-free: 877-724-9673 Fax: 360-394-6039

Please email comments and suggestions regarding this site to webmaster@mackichan.com.
© Copyright 1998 - MacKichan Software, Inc. All rights reserved.