Document 722

Hyphenation patterns for different languages

Version: 4.x & 5.x - Scientific WorkPlace & Scientific Word

The hyphenation of words differs for different languages. The LaTeX format file latex_ml.fmt, created with standard SWP or SW installations, stores information about the hyphenation patterns for these languages:

  • English

  • American English

  • French

  • German

  • German new orthography

Additionally, the Extras/TrueTeXFormatFiles directory on the program CD includes format files for

  • Spanish

  • Italian

  • Portuguese

If you use more than one language in your document, you can switch the hyphenation patterns when you switch the base language if both these conditions are met:

  • The Babel package has been added to your document.

  • The hyphenation patterns for the appropriate languages are included in the format file in use.

You can add hyphenation patterns for different languages or remove patterns you don't need by tailoring the TCITeX\TeX\LaTeX\required\babel\language.dat file. If you add a hyphenation pattern not included in the format files provided with the program, you must also create a format file that includes the pattern.

Adding a hyphenation pattern

  1. Save a copy of the file TCITeX\TeX\LaTeX\required\babel\language.dat under a new name.

  2. Using an ASCII editor, open the file TCITeX\TeX\LaTeX\required\babel\language.dat.

  3. Add a line for the new hyphenation pattern.

    For example, if you have access to a Swedish hyphenation pattern, you might add a line that reads swedish swhyph.tex.

  4. Save and close the file.

  5. Generate a new format file:

    1. Start the TrueTeX Formatter from the SWP or SW program submenu.

    2. Choose CANCEL in the open dialog box.

    3. Choose the Preload= menu item.

    4. Choose Default.

    5. From the File menu, choose Open TeX source file and navigate to the TCITeX\TeX\LaTeX\base directory.

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

  6. Rename and move the files.

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

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

  7. Create a formatter entry for the new format file:

    1. From the Typeset menu, choose Expert Settings, and then choose the Format Settings tab.

    2. Choose Add/Modify.

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

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

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

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

    7. If you make an error, choose Revert to original and enter the settings again.

    8. Choose OK.

  8. Preview a document and check the .log file to verify that no TeX errors occurred and the new format is working correctly.

Removing a hyphenation pattern

  1. Using an ASCII editor, open the file TCITeX\TeX\LaTeX\required\babel\language.dat.

  2. Type a % at the start of each line that contains a hyphenation pattern for a language you don't want.

  3. Save and close the file.

  4. Complete steps 5–9 above to generate a new format file.

Note that if only one hyphenation pattern remains, the system will use it regardless of the language in which you write. If two or more hyphenation patterns remain, open your document in SWP or SW, add the Babel package, and select the language you want to use.

Last revised 06/29/06