[Tex/LaTex] \flushleft prevents first line indentation!

horizontal alignmentindentation

I am using \flushleft to left justify a paragraph, but it removes the first line indentation. Any ideas?enter image description here

Best Answer

First of all, flushleft is a list environment. You should not use it as a command. Use \raggedright as the corresponding command.

flushleft and \raggedright set \parindent to 0pt. So you could get back the indent setting \parindent, e.g., to 1em:

\documentclass{article}

\usepackage{mwe}

\begin{document}
\raggedright\setlength{\parindent}{1em}
\lipsum
\end{document}

But the result is very ugly. Perceptibility would be better, if you'd use paragraphs with empty lines:

\documentclass{article}

\usepackage{parskip}
\usepackage{mwe}

\begin{document}
\raggedright
\lipsum
\end{document}

You may also allow hyphenation using package ragged2e:

\documentclass{article}

\usepackage{parskip}
\usepackage{ragged2e}
\usepackage{mwe}

\begin{document}
\RaggedRight
\lipsum
\end{document}

paragraph with skip

Automatic indent or changing the ragged zone and the filling of the last line is also available:

\documentclass{article}

\usepackage{ragged2e}
\usepackage{mwe}

\setlength{\RaggedRightParfillskip}{.25\textwidth plus 1fil}
\setlength{\RaggedRightRightskip}{0pt plus .1\textwidth}
\setlength{\RaggedRightParindent}{1em}

\begin{document}
\RaggedRight
\lipsum
\end{document}

paragraphs with indent

Related Question