# [OS X TeX] latex: do not disrupt

Bruno Voisin Bruno.Voisin at hmg.inpg.fr
Thu Nov 14 13:16:38 EST 2002


Le jeudi, 14 nov 2002, à 18:49 Europe/Paris, Stephan Hochhaus a écrit :

> How do I keep LaTeX from disrupting my words?

In (La)TeX idiom

this is the word that should not be {disrupted}

becomes

\hyphenation{disrupted}

to be put somewhere in your document (before writing the word
"disrupted" itself), as opposed to

\hyphenation{dis-rupted}

which creates the possibility of hyphenating the word at a certain
point.

Are you sure you really want to do this? Generally (La)TeX finds
correct hyphenations, except in a few cases (names of persons from
other countries, for example). Assuming you use the babel package and
choose the correct hyphenation file for your language, you should get
no problem; even if you need to insert a few words from other
languages, to be hyphenated differently, the babel package introduces
the convenient command \foreignlanguage.

For example you can have a LaTeX file with the following structure:

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage[francais,english]{babel}

\begin{document}

\selectlanguage{french}

Texte français avec au milieu \foreignlanguage{english}{Cambridge
University Press} et ainsi de suite.

\end{document}

Bruno Voisin

PS \mbox{disrupted} is likely to produce a word protruding in the right
margin, whereas \hyphenation{disrupted} (to be put for example in the
preamble of your document) should produce properly balanced lines.

-----------------------------------------------------
Mac TeX info, resources, and news can be found at:
<http://www.esm.psu.edu/mac-tex/>
-----------------------------------------------------
List archives can be found at:
<http://www.esm.psu.edu/mac-tex/MacOSX-TeX-Digests/>
-----------------------------------------------------
See message headers for list info.
-----------------------------------------------------