\flushleft prevents first line indentation!

5,354

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

Share:
5,354

Related videos on Youtube

Ahmed Hawary
Author by

Ahmed Hawary

Updated on August 01, 2022

Comments

  • Ahmed Hawary
    Ahmed Hawary over 1 year

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

    • David Carlisle
      David Carlisle almost 7 years
      that is as it is designed, if you want flush left but with indentation you can used \raggedright\parindent=15pt to set it back, note that flushleft is defigned to be used as \begin{flushleft} use \raggedright if you want a command form.