Text Formatting ⇒ no hyphentation for one word
no hyphentation for one word
Hi latex folk,
I am using hyphenation for my document but I need to turn it off for some particular words (like POSIX or openVPN). I want to use it for the rest of the document but I want POSIX or openVPN to always "stick together". How can I achieve that?
thanks
I am using hyphenation for my document but I need to turn it off for some particular words (like POSIX or openVPN). I want to use it for the rest of the document but I want POSIX or openVPN to always "stick together". How can I achieve that?
thanks
NEW: TikZ book now 40% off at Amazon.com for a short time.

no hyphentation for one word
One way would be to put (preferably after \begin{document}) the following code:
This command allows you to specify custom hyphenation points and, if there are none, like in this case, it'll make sure the word isn't hyphenated at all.
Another way might be the manual one: to use \mbox{}:
or even to create a custom command which you will use for all those words, e.g.
Code: Select all
\hyphenation{posix openvpn}
Another way might be the manual one: to use \mbox{}:
Code: Select all
\mbox{POSIX}
\mbox{openVPN}
Code: Select all
\newcommand{\nohyph}[1]{\mbox{#1}}
\nohyph{POSIX}, \nohyph{openVPN} ...
Last edited by meho_r on Wed Feb 23, 2011 11:51 pm, edited 1 time in total.
no hyphentation for one word
Put the following in your preamble:
Also, with the hyphenat package you can specify words that will not be hyphenated once by specifying in your document.
EDIT: beaten by the clock and meho_r 
Code: Select all
\hyphenation{openVPN}
\hyphenation{POSIX}
Code: Select all
\nohyphens{openVPN}

howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Follow howtoTeX on twitter
no hyphentation for one word
I wouldn't place \hyphenation command in the preamble, but after \begin{document}. The reason is that, in case he's using XeLaTeX and Polyglossia, \hyphenation command in the preamble can easily be missed/ignored.
Re: no hyphentation for one word
thank you all 

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
no hyphentation for one word
Now that the problem is solved, please mark the topic (not the last post) accordingly.koszta5 wrote:thank you all […]
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10