-
Book Overview & Buying
-
Table Of Contents
LaTeX Beginner's Guide
Remember the first parbox example which was fully justified but had those big gaps between the words. We shall give up justification to the right side to avoid such gaps.
Create a new document containing these lines:
\documentclass{article}
\begin{document}
\parbox{3cm}{\raggedright
TUG is an acronym. It means \TeX\ Users Group.}
\end{document}Typeset and look at the output:

We inserted the declaration \raggedright
. From this point onwards, the text will be ragged-right. In other words, the text will be moved to the left margin - "flushed-left". There won't be hyphenation.
Because we used this declaration inside a box, it's only valid there, like inside environments. After the box, the text will be fully justified again.
If we want the whole document to be ragged-right, we just need to use \raggedright in our preamble.
There might be occasions when we would like to achieve the opposite effect...