# ragged-right text and preserve paragraph indentation

I want to justify my text to left without losing the paragraph indentation. I tried ragged and flushleft, although both justify the text and the next paragraph. So I am losing intendation. I do not want to do individual paragraphs because my document is pretty long.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. May 28, 2014 at 23:58
• matter of terminology here ... "justified" text has an even margin on both sides (modulo beginnings and endings of paragraphs). what you are asking for is "ragged" text, in this case "ragged right", where the right-hand margin is uneven, depending on the "natural" width of what fits on each line. text that is ragged on the left is "ragged left", and text that is ragged on both sides is usually referred to as "centered". "justify" is usually not used to refer to just one edge. May 29, 2014 at 13:12

Do you just want something like this?

\documentclass{article}
\usepackage{kantlipsum}
\newlength{\normalparindent}
\setlength{\normalparindent}{\parindent}
\raggedright
\setlength{\parindent}{\normalparindent}

\begin{document}

\kant[1-3]

\end{document}


Or, using \RaggedRight from the ragged2e package you can assign the desired value to the length \RaggedRightParindent for indentation:

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

\setlength\RaggedRightParindent{15pt}
\RaggedRight

\begin{document}

\lipsum[1-3]

\end{document}


• This looks better. Just the only time I'd use this is for cases where I basically need to conform to some rule and usually 'not justified' seems to go along with 'no hyphenation'. But maybe I've just had peculiarly unaesthetic experiences ;).
– cfr
May 29, 2014 at 0:12
• If I add a5paper like so \documentclass[12pt,a5paper]{article}, the paper size doesn't change. Dec 25, 2015 at 2:09
• Edit: Ahh.. I should use \usepackage[a5paper]{geometry} instead of adding a5paper in the document class :) Now it works fine. Thanks. Dec 25, 2015 at 2:29

I found that just setting the variable parindent after enabling raggedright, kept paragraph indentation for me.

E.g.,

\raggedright
\parindent=.35in

\begin{document}
Some text.

Another paragraph with more text.
\end{document}