O'Reilly logo

LaTeX Beginners Guide by Stefan Kottwitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – justifying a paragraph to the left

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.

  1. 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}
  2. Typeset and look at the output:
    Time for action – justifying a paragraph to the left

What just happened?

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required