[texhax] hyphenation
Michael Barr
barr at math.mcgill.ca
Tue Jan 15 16:37:01 CET 2008
Since the original post asked about confining the non-hyphenation to only
a portion of the file, I am surprised no one has mentioned the obvious
solution, which appears below. Note that the blank line that precedes the
} is necessary since the hyphenpenalty has to be in effect when tex
realizes that the paragraph is finished. I suppose this could all be
dressed into a latex environment, but I have not tried that.
Michael Barr
\documentclass{article}
\begin{document}
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
{\hyphenpenalty10000
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
}
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
long\-words\-that are\-easy\-to hyph\-en\-ate
\end{document}
More information about the texhax
mailing list