Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to put pdflatex to not put a hyphen in a word went it comes to the end of the line.

I tried to put a \- in the beginning or the end of that word but it doesn't work.

For example if I put:This is a very long sentence that needs two lines with thatshouldnot\- be hyphened I will get:

This is a very long sentence that needs two lines with thatshouldnot-
be hyphened

and if I do it this way: This is a very long sentence that needs two lines with \-thatshouldnot be hyphened I will get:

This is a very long sentence that needs two lines with -
thatshouldnot be hyphened

I want 'thatshouldnot' to stay in one word and with no hyphen in the beginning or the end of the word.

share|improve this question
1  
Do you want to suppress hyphenation of (a) all words everywhere, (b) all words of that paragraph, (c) all occurences of thatshouldnot, or (d) only this one word thatshouldnot ? –  tohecz Aug 17 '12 at 14:30
    
@tohecz (c) all occurences of thatshouldnot –  MSIS Aug 17 '12 at 15:28
    
Is this similar to my question? tex.stackexchange.com/questions/100010/… –  Jörg Apr 19 '13 at 13:01

2 Answers 2

up vote 18 down vote accepted

if this word appears more than once in your document, and you never want it to be hyphenated, you can suppress hyphenation everywhere by putting this line in the preamble:

\hyphenation{thatshouldnot}

if it only occurs once, then david's answer using \mbox suffices.

share|improve this answer

Put it in a box:

\mbox{thatshouldnot}
share|improve this answer

Your Answer

 
discard

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.