Text Formattingsingle-double letter words and line breaking

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
drowsy
Posts: 44
Joined: Tue Dec 23, 2008 6:00 am

single-double letter words and line breaking

Post by drowsy »

Hi,

is there a way to forbid TeX break lines right after "a" or "of"?
Of course, I do put "~" after such words often, but I also often
forget to do so.

Maybe there is a dictionary of words that are forbidden to
appear at the end of a line?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: single-double letter words and line breaking

Post by corderin »

In your case I will use with "a" and "of" the following, there is a command \nolinebreak, you could do the following:

\renewcommand{\a}{a \nolinebreak}
\renewcommand{\of}{of \nolinebreak}

and then use \a in case this would be breaked at the end of a lineor \of, also write normal print it and in the cases once you have the new commands you only have to write a \ in front of the word...
Post Reply