45

I know about discretionary hyphens, \-, about \allowbreak, \nobreak as well as \hyphenation{...} and even \tracingparagraphs=1 to write hyphenations into the log-file. Those are OK for family names or quite rare tecnical terms, but from time to time LaTeX makes hyphenation mistakes which I would like to prevent for all documents on my PC. Is there a configuration file where I can add hyphenation for all TeX documents? As a second thought: is there someone to whom to apply for adding/changing hyphenation rules for TeX globally?

For example "determined" broken into "determ-ined" by Tex instead of "deter-mined" ("de-termined" would also be possible). (Might have been corrected by some update, which my distribution does not include yet, but surely there are some words left.) There is

% File: ukhyphen.tex
% TeX hyphenation patterns for UK English [NOT TO BE CHANGED IN ANY WAY!]
...
\hyphenation{ % Do NOT make any alterations to this list! --- DW 
...
}

which probably would do the job (at least locally for my PC), but I get the vague impression that the autors do not want me to change that file, and if there ever would be an update of the file, my hyphenations would be lost.

\documentclass[british]{article}
\usepackage[british]{babel}
\usepackage{hyphenat}
\hyphenation{he-lio-trope opos-sum}
\tracingparagraphs=1
\begin{document}
\pagenumbering{arabic}
\selectlanguage{british}
\allowhyphens

Ms Miller-\allowbreak Smith ba\-la\-clava {\nobreak areca} 
electromagnetic\hyp{}endioscopy heliotrope opossum.

\end{document}
Stephen
  • 14,890

2 Answers2

30

A simple workround would be to have a personal custom style file that includes, for example,

\usepackage{hyphenat}
\hyphenation{he-lio-trope opos-sum}

that you can include as desired. Just put it on the local texmf tree in an appropriate place. With these two lines in myhyph.sty:

\documentclass[british]{article}
\usepackage[british]{babel}
\usepackage{myhyph}
\tracingparagraphs=1
\begin{document}
\pagenumbering{arabic}
\selectlanguage{british}
\allowhyphens

Ms Miller-\allowbreak Smith ba\-la\-clava {\nobreak areca} 
electromagnetic\hyp{}endioscopy heliotrope opossum.

\end{document}

An included file should work as well.

mas
  • 5,949
8

First, make sure to load the file ushyphex.tex, which should be in every TeX distribution. The latest version of this file may be found at http://mirrors.ctan.org/info/digests/tugboat/hyphenex/ushyphex.tex.

Second, do check out the following recent question and the associated answers, Where can I find a list of English hyphenation exceptions?, for more information on this subject.

If you've discovered words that are improperly hyphenated by TeX and aren't included in the file ushyphex.tex, you should send Barbara Beeton (the maintainer of the hyphenation exception list) an email message with the salient information; she's at bnb (at) ams dot org .

By the way, you must have a really old version of TeX to have it hyphenate the word "determined" as "determ-ined". Mine -- TeXLive 2011 -- happily does not have this problem. Similarly, TeXLive 2011 hyphenates balaclava as bal-a-cla-va, which is correct according to the online edition of Merriam-Webster. :-)

Mico
  • 506,678
  • 1
    A comment on my own answer: I realize that the OP's question refers to UK-English rather than to US-English hyphenation patterns. Hopefully, though, the differences in hyphenation patterns between these two strands of the same language aren't too serious to make loading ushyphex.tex unusable for his purposes. Somebody correct me if my hope is unfounded! – Mico Sep 08 '11 at 21:05
  • 1
    Unfortunately, ushyphex.tex is not included in the most recent version of my distribution. ukhyphen.tex is Revision 2.0 1996/09/10 15:04:04 ucgadkw. Well, I will use myhyph.sty and manually install and include ushyphex.tex, but now I am as curiouse as Mico: Are there any differences between US- and UK-hyphenation? Or can somebody confirm that there are none? – Stephen Sep 09 '11 at 18:07
  • 1
    Stephen: I too hope that somebody can answer our question whether US-English and UK-English hyphenation rules differ or not. – Mico Sep 09 '11 at 18:20
  • 1
    @Mico: In fact, they do and the difference is not too small. Try, for instance, \showhyphens{analysis} or \showhyphens{database}. – mhp Sep 10 '11 at 17:23
  • 1
    @mhp Thanks mhp for this language regarded question. Then I'm back at the search for ukhyphex.tex (or by any another name). Any suggestions? Or should I add another question for a set of UK-hyphenation rules? – Stephen Sep 10 '11 at 18:35
  • 2
    @Stephen: The file containing the TeX hyphenation patterns for UK English is no longer named ukhyphen.tex. It has been renamed to hyph-en-gb.tex in 2008. Note that “determined” is still hyphenated as “de-term-ined”. This seems to be bug. – mhp Sep 10 '11 at 19:31
  • @mhp and Stephen: Glad you've found the more up-to-date version of the UK hyphenation exception list. Well, I did suspect that the hyphenation rules between the US and UK forms of English weren't perfectly identical; I suppose what matters in the end, from a pragmatic point of view, is if you're better with or without loading a US-English-centric hyphenation exception list. If you do load it, it may be worth going through it once to spot for obvious differences. One thing I've noticed from the US file is that it catches of lot of hyphenation points that TeX otherwise misses completely. :-) – Mico Sep 10 '11 at 19:52
  • @Barbara-Beeton (and @ Mico): balaclava is hyphenated bal-a-cla-va according to the online edition of Merriam-Webster, but ba-la-clava according to the 1989 printed fourth edition of Oxford Advanced Learner's Dictionary, p. 77. But which one is correct UK-English? (If there is a difference to US-English here: Which one is correct US-English?) Just posted this as question at http://english.stackexchange.com/q/41545/12903 – Stephen Sep 12 '11 at 08:58
  • ushyphex.tex is included in the package hyphenex which can be found on ctan: hypenex. – Jost Jul 16 '15 at 09:35