# How to vary alignment in document?

I wanted to left align my document in such a way that some pages...e.g. Abstract to remain justified, but the rest of the document left aligned. Anyway to do that?

-
As you have asked 9 question so far and 7 of them have got at least one answer, it would be nice if you started to upvote helpful answers and to accept the "best" (in your opinion) answer to each question. – lockstep Jul 4 '11 at 18:36
@ lockstep: Oh yes...thanks very much for the reminder! A lot of times I try to do that but didn't know that the icons are on the left:-( I will now and henceforth! Cheers – BrettHarry Jul 4 '11 at 19:26
It's also allowed to make up leeway with regard to former questions. ;-) – lockstep Jul 4 '11 at 19:34

\documentclass{article}
\usepackage{lipsum}
\usepackage{ragged2e}
\begin{document}

\begin{abstract}
\lipsum[1]
\end{abstract}
\raggedright
\lipsum[2]

\justifying
\lipsum[3]

\end{document}

-
Instead of using \raggedright it might be better for hyphenation to use \RaggedRight (which is defined in ragged2e). – N.N. Jul 4 '11 at 20:14

As Harrold Cavendish mentioned it can be done with the ragged2e package. In the following example the whole document is set to raggedright by using the document option and the abstract is kept justified by placed inside a justifying environment:

\documentclass{article}

\usepackage[document]{ragged2e}

\usepackage{lipsum}

\begin{document}

\begin{abstract}
\begin{justify}
\lipsum[1]
\end{justify}
\end{abstract}

\lipsum[2]

\end{document}


The following is said of the document option of ragged2e in the manual:

This options sets the complete document ragged-right by executing a \RaggedRight at \begin{document} and the raggedrightboxes and the footnotes options.

-
\justifying is the command; the environment that uses it is named justify. – lockstep Jul 4 '11 at 18:29
I am sorry for making it look like I am too lazy to post an answer and then posting it before you. I thought I did not have time but then decided to add the answer anyway. – Harold Cavendish Jul 4 '11 at 18:30
@BrettHarry What happens when you try it? If you get an error please paste it here. – N.N. Jul 4 '11 at 19:49
@BrettHarry You seem to have a quite old TeX distribution, judging from the pop empty colorpage stack 0 message. Moreove it's impossible to check if you don't give an address where to find the Thesis class. On the other hand, the There is no line to end is usually related to two \\ commands in a row, which is a "no no". – egreg Jul 4 '11 at 21:51
@BrettHarry: It's not a standard class, nor it is in CTAN. There's no way we can help if you don't say where it can be found. – egreg Jul 5 '11 at 13:51