# Pourquoi la césure ne fonctionne pas?

## Version courte

Vérifiez avant toute chose que vous avez bien sélectionné la langue du document via babel ou polyglossia.

• Si votre problème concerne un mot ou groupe de mots qui contient déjà un trait d'union, voir ici ;
• S'il s'agit d'un mot étranger à la langue principale du document, deux solutions au choix :
• Définir cette langue comme langue secondaire du document et utiliser la commande appropriée sur le passage concerné :
• Pour polyglossia, voir les commande \setotherlanguage et \text<lang>{} dans la documentation) ;
• Pour babel, voir un exemple détaillé ici.
• Dans les autres cas, il s'agit probablement d'un mot pour lequel il n'y a pas de césures prédéfinies. Dans ce cas, définissez-les vous-mêmes.

## Explications et autres références

Traduire et probablement réduire pour ne laisser que les principes généraux.

Let's assume you've selected the right TeX “language” — as explained in “how hyphenation works”, you're not likely to get the correct results typesetting one language using the hyphenation rules of another. (Select the proper language, using babel if you're a LaTeX user. This may reveal that you need another set of hyphenation patterns; see “using a new language” for advice on how to install it.)

So what else can go wrong?

Since TeX version 3.0, the limits on how near to either end of a word hyphenation may take place have been programmable (see “weird hyphenation”), and for somebreason the values in question may have been corrupted in some macros you are using. TeX won't hyphenate less than \lefthyphenmin characters after the start of a word, nor less than \righthyphenmin before the end of a word; thus it won't hyphenate a word shorter than the sum of the two minima, at all. For example, since the minima are 2 and 3 for English, TeX won't hyphenate a word shorter than 5 letters long, if it believes the word to be English.

TeX won't hyphenate a word that's already been hyphenated. For example, the (caricature) English surname Smyth-Postlethwaite wouldn't hyphenate, which could be troublesome. This is correct English typesetting style (it may not be correct for other languages), but if needs must, you can replace the hyphen in the name with a \hyph command, defined \def\hyph{-\penalty0\hskip0pt\relax}. This is not the sort of thing this FAQ would ordinarily recommend… The hyphenat package defines a bundle of such commands (for introducing hyphenation points at various punctuation characters).

There may be accent commands in the word. The causes of and remedies for this effect are discussed in accents and hyphens.

The hyphenation may simply not have been spotted; while TeX's algorithm is good, it's not infallible, and it does miss perfectly good hyphenations in some languages. When this happens, you need to give TeX explicit instructions on how to hyphenate.

The \hyphenation command allows you to give explicit instructions. Provided that the word will hyphenate at all (that is, it is not prevented from hyphenating by any of the other restrictions above), the command will override anything the hyphenation patterns might dictate. The command takes one or more hyphenated words as argument — \hyphenation{ana-lysis pot-able}; note that (as here, for analysis) you can use the command to overrule TeX's choice of hyphenation (ana-lysis is the British etymological hyphenation; some feel the American hyphenation feels “unfortunate”…).

If you are working with a multilingual document in LaTeX, you may define different rules for different languages using \babelhyphenation, which is similar to \hyphenation but accepts a list of languages as the first (optional) parameter.

3_composition/langues/cesure/la_cesure_ne_fonctionne_pas.txt · Dernière modification: 2021/08/19 17:43 par jejust