11

I don't want my report justified. I want it \raggedright.

I added a \begin{raggedright} / \end{raggedright} pair around the whole document, and it is working, but I'm wondering if I can somehow include the directive at the document level (without having to enclose the entire document like that! Feels awkward.)

21

Just add \raggedright after \begin{document}.

The idea behind using an environment limits the scope of \raggedright. However, if no scope is specified, it is set globally. If you want to keep things clean, you could add \AtBeginDocument{\raggedright} in your document preamble.

A slightly more advanced form of \raggedright is provided by the ragged2e package. It provides \RaggedRight, which allows some hyphenation.

  • 2
    I have always just added \raggedright in the preamble. Is there a reason not to? – Karl Ove Hufthammer Nov 7 '11 at 11:10
  • That works as well in this case. I've always just added that kind of styling within the document environment. It may be that some document class (or package) issues a different justification \AtBeginDocument, which will override \raggedright if put in the preamble. – Werner Nov 7 '11 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.