Problems with hyphenation

mako's picture

The hyphenation does not work correctly, it separates the words on the wrong place. Additionally, some words are not separated, and thus its line is longer than the others. What do I have to consider?

John MacKendrick's picture

By default, the format files

By default, the format files are set to hyphenate for the English language.

If you choose Help, Search, search for "format files" and select "multilingual format files", you will see more information on this topic, including information on generating your own format files.

mako's picture

I found this entry. Is it

I found this entry. Is it really necessary to reinstall SWP??

 

Building new multilingual format files

    We created latex_ml.fmt with the TrueTeX formatter. We first modified the font encoding specification to ensure that T1 encoding is the default. We also added changes to accommodate the DC fonts. Next, we changed the fonttext.cfg file to preload hyphenation patterns into the LaTeX format. Finally, we used the TrueTeX Formatter to generate the new format file, renamed it, and moved it to the TCITeX\truetex directory.
    If you update the version of LaTeX or Babel on your system, you must create a new LaTeX format file. For safety, back up the existing base directory before you begin.
>  How to create a new multilingual LaTeX format file

1.Reinstall SWP or SW.
Use the Repair Installation option in the installation program, which ensures that the default set of files is present.
2.Modify the fonttext.cfg file:
 a.In the TCITeX\TeX\LaTeX\base directory, copy the fonttext.ltx file and rename the copy fonttext.cfg.
 b.Modify fonttext.cfg so that the T1 encoding scheme is the default:
  i.Using an ASCII editor, open the file.
  ii.Change line that reads \newcommand\encodingdefault{OT1} to
\newcommand\encodingdefault{T1}
Note that this change causes DC fonts to appear in many documents.
  iii.Save and close the file.
3.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.
 a.Start the TrueTeX Formatter with the shortcut in the SWP or SW program group.
 b.Open the file oldDC.ins in the TCITeX\TeX\LaTeX\base directory.
 c.Answer yes to all questions about overwriting files.
4.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.
 a.Using an ASCII editor open the file TCITeX\TeX\LaTeX\required\babel\language.dat, which preloads hyphenation patterns into the LaTeX format.
 b.Find these lines in the file:
=USenglish
american ushyphen.tex
ukenglish 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. However, two filenames are misspelled and the Dutch hyphenation patterns are too large for TrueTeX.
 c.Change the file to read:
=USenglish
american ushyph.tex
ukenglish ukhyphen.tex
=UKenglish
=british
french frhyph.tex
german   dehypht.tex
ngerman dehyphn.tex
 d.Save and close the file.
5.Generate the new format file:
 a.Start the TrueTeX Formatter with the shortcut in the SWP or SW program group.
 b.Choose CANCEL in the open dialog.
 c.Choose the Preload= menu item.
 d.Choose Default.
 e.From the File menu, choose Open TeX source file and navigate to the TCITeX\TeX\LaTeX\base directory.
 f.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 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.
7.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.
8.
<MSIHYPERREF>
  <topic>Create a formatter entry</topic>
</MSIHYPERREF>
 for the new format file.
9.Preview a document and check the .log file to verify that no TeX errors occurred and the new format is working correctly.

It may not be necessary to

It may not be necessary to reinstall.  These instructions were written so that there was a known starting point.  You may already be at that starting point, so the reinstall shouldn't matter.

Your first message didn't indicate the language you are working with.  Creating a new format file is worthwhile only if you are using a language that is not already included in the multi-lingual format file.

mako's picture

The language I'm using is

The language I'm using is german. Where can I see whether it is included in the multi-lingual format file?

German is included in the

German is included in the multi-lingual format file.  Have you selected German as the current language?  This would be true if you started your document using one of the German shells.

The beginning of the LaTeX run (on the console and also the .log file) shows the hyphenation patterns available:

LaTeX2e <2003/12/01>
Babel <v3.8a> and hyphenation patterns for american, english, french, german, n
german, loaded.

The .log file also shows the languages that have been activated in the document:

(c:/swp55/TCITeX/tex/latex/required/babel/ngermanb.ldf
Language: ngermanb 2004/02/20 v2.6m new German support from the babel system

Post your .log file a sample document if you are unsure if German is being selected as the language.

mako's picture

The spelling dictionary is

The spelling dictionary is already for the german language, but the hyphenation does not work correctly at all :-(

The language dictionary is

The language dictionary is not related to the hyphenation used during typesetting.

John MacKendrick's picture

German is already included in

German is already included in the multilingual format file. First, make sure the right format file is being used.

Choose Typeset, Expert Settings, DVI Format Settings, and make sure the TrueTeX MultiLingual file is being used. Then go to the PDF Format Settings and make sure the TrueTeX pdfTeX MultiLingual formatter is selected. Then, to make sure that German is being used in your document, add the Babel package and select german as the language.

See http://www.mackichan.com/techtalk/465.htm for more information about the babel package.

mako's picture

THANKS!!!

THANKS!!!