Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
4  
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
1  
@ 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
1  
It's also allowed to make up leeway with regard to former questions. ;-) –  lockstep Jul 4 '11 at 19:34
add comment

2 Answers

up vote 4 down vote accepted
\documentclass{article}
\usepackage{lipsum}
\usepackage{ragged2e}
\begin{document}

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

\justifying
\lipsum[3]

\end{document}
share|improve this answer
1  
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
add comment

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.

share|improve this answer
3  
\justifying is the command; the environment that uses it is named justify. –  lockstep Jul 4 '11 at 18:29
1  
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
1  
@BrettHarry What happens when you try it? If you get an error please paste it here. –  N.N. Jul 4 '11 at 19:49
2  
@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
2  
@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
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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