blob: 35e272da88978aa627e47d05a2d15387535d6c1d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<head>
<title>UK TeX FAQ -- question label wdnohyph</title>
</head><body>
<h3>Preventing hyphenation of a particular word</h3>
<p/>It’s quite possible for (<em>any</em>) hyphenation of a particular word
to seem “completely wrong”, so that you want to prevent it being
hyphenated.
<p/>If the word occurs in just one place, put it in a box:
<blockquote>
<pre>
\mbox{oddword}
</pre>
</blockquote><p>
(Plain TeX users should use <code>\</code><code>hbox</code>, and take care at the start
of paragraphs.) However, boxing the word is not really advisable
unless you are sure it only occurs once.
<p/>If the word occurs commonly, the best choice is to assert a
non-hyphenation for it:
<blockquote>
<pre>
\hyphenation{oddword}
</pre>
</blockquote><p>
This hyphenation exception (with no break points) will be used in
preference to what TeX’s hyphenation algorithm may come up with.
<p/>In a multilingual document, repeat the exception specification for
each language the word may appear in. So:
<blockquote>
<pre>
\usepackage[french,english]{babel}
\selectlanguage{english}
\hyphenation{oddword}
\selectlanguage{french}
\hyphenation{oddword}
</pre>
</blockquote><p>
(note that <i>babel</i> will select the default language for the
document — English, in this case — at <code>\</code><code>begin{document}</code>.)
<p/>A particular instance of this requirement is avoiding the hyphenation
of acronyms; a general rule for those that concoct acronyms seems to
be to make the capital-letter sequence read as near as is possible
like a “real” word, but hyphenating an acronym often looks silly.
The TeX flag <code>\</code><code>uchyph</code> is designed for suppressing such
behaviour:
<blockquote>
<pre>
\uchyph=0
</pre>
</blockquote><p>
will stop hyphenation of upper-case words. (Note that Plain TeX
syntax is needed here: there’s no LaTeX alternative for setting
this value.)
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wdnohyph">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wdnohyph</a>
</body>
|