Welcome to the UK List of
TeX Frequently Asked Questions
on the Web

Searching

The index of Frequently Asked Questions about TeX is searchable.

Please enter your keyword here:   then press here: ,    or:
Google

Preventing hyphenation of a particular word

It’s quite possible for (any) hyphenation of a particular word to seem “completely wrong”, so that you want to prevent it being hyphenated.

If the word occurs in just one place, put it in a box:

\mbox{oddword}

(Plain TeX users should use \hbox, and take care at the start of paragraphs.) However, boxing the word is not really advisable unless you are sure it only occurs once.

If the word occurs commonly, the best choice is to assert a non-hyphenation for it:

\hyphenation{oddword}

This hyphenation exception (with no break points) will be used in preference to what TeX’s hyphenation algorithm may come up with.

In a multilingual document, repeat the exception specification for each language the word may appear in. So:

\usepackage[french,english]{babel}
\selectlanguage{english}
\hyphenation{oddword}
\selectlanguage{french}
\hyphenation{oddword}

(note that babel will select the default language for the document — English, in this case — at \begin{document}.)

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 \uchyph is designed for suppressing such behaviour:

\uchyph=0

will stop hyphenation of upper-case words. (Note that Plain TeX syntax is needed here: there’s no LaTeX alternative for setting this value.)


Go to previous question, or next question

Go to FAQ home.

URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wdnohyph

Comments, suggestions, or error reports? - see “how to improve the FAQ”.

This is FAQ version 3.26, released on 2013-02-25.
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wdnohyph
www.tex.ac.uk
crawl=CC-MAIN-2013-20
3932
application/http; msgtype=response
sha1:ACRGL2OI4O442WAUBWVE2W53IHLNATG6
<urn:uuid:b684dcab-fc41-41f8-8c30-e3ab2f6c65a1>
2013-05-18T10:41:42Z
128.232.0.22
sha1:SI6CM74BN3P4JVWW2AQVSHTTPRSRUYHJ
<urn:uuid:95b41e48-8364-4e38-8152-eb2a5262c61e>
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=wdnohyph
response
<urn:uuid:ada83500-666f-4f66-a16e-9b32d6621b34>
robots: classic
hostname: ip-10-60-113-184.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2013-20
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for Spring 2013
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf