TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

from Tex FAQ - hyphenation I see that trying to help Latex in correctly hyphenating words won't work when the utf8 encoding is used. Is there a work around?

share|improve this question
Is 'Use LuaTeX or XeTeX' going to be an acceptable answer? – Joseph Wright Apr 27 '11 at 13:17
The web page you are quoting doesn't contain the word "utf8" and actually doesn't say anything about input encodings. Your claim is wrong. – Ulrike Fischer Apr 27 '11 at 13:19
@Ulrike: should I add \usepackage[T1]{fontenc} in my preambule together with \usepackage[utf8]{inputenc}? – pluton Apr 27 '11 at 13:40
@Joseph: I am still a pdflatex user but I may switch sometime in the future. – pluton Apr 27 '11 at 13:41
@pluton: Yes you need T1-encoding. – Ulrike Fischer Apr 27 '11 at 13:51
up vote 2 down vote accepted

since it may be useful to someone, for specific languages with accents for instance, the \hyphenation command will correctly work only with a T1-encoding \usepackage[T1]{fontenc} but won't without.

share|improve this answer
@pluton: I don't think this is quite correct. The \hyphenation command will work when the font encoding corresponds to what is pre-supposed in the pattern file, and when the hyphenated word uses only accented letters available as single glyphs. Althougth I am not sure what I say is 100% correct, at least the following code shows that your restriction to T1 is not correct: – jfbu Apr 27 '11 at 16:20
\documentclass{article} \usepackage[greek]{babel} \usepackage{gfsbodoni} \usepackage[LGRx,LGR]{fontenc} \hyphenation{\'ab-gd-\>ez} \def\somestuff{abgdez abgdez abgdez abgdez abgdez abgdez abgdez} \def\somestuffwithaccent{\'abgd\>ez \'abgd\>ez \'abgd\>ez \'abgd\>ez \'abgd\>ez \'abgd\>ez \'abgd\>ez} \begin{document} \parbox{2cm}{\somestuff}\hspace{1cm} \parbox{2cm}{\somestuffwithaccent} \end{document} – jfbu Apr 27 '11 at 16:23
I should have said that my example uses lgrxenc.def available from milde.users.sourceforge.net/LGR furthermore, my latex format is not precompiled with the greek patterns, so babel complains in the log, and perhaps if I am extremely unlucky a more complete set-up would hyphenate by default abgdez like I arbitrarely declared for its version with the two accents. – jfbu Apr 27 '11 at 16:27
all existing hyphenation pattern packages on ctan have been translated into utf-8, and xetex and luatex use those translated tables (note that in those processors, the font is unicode-based). inputenc/utf-8 input is translated to some font encoding (e.g., t1, or t2a) that deals with the characters, so hyphenation in this case is completely unaffected by the input coding. – wasteofspace Apr 27 '11 at 16:43
@pluton: You need T1-encoding for your (french) words. The LGR-encoding mentioned by jfbu is for greek and not relevant for you. – Ulrike Fischer Apr 28 '11 at 8:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.