[Tex/LaTex] Indenting a whole paragraph

indentationparagraphs

How do I indent a whole paragraph at the same distance from my left margin, with the simplest command or environment?

Best Answer

Without any additional packages, you could wrap your paragraph in a minipage:

enter image description here

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1]

\hfill\begin{minipage}{\dimexpr\textwidth-3cm}
\lipsum[2]
\xdef\tpd{\the\prevdepth}
\end{minipage}

\prevdepth\tpd\lipsum[3]
\end{document}
​

In the above example, the paragraph depth correction (via \prevdepth is from How to keep a constant baselineskip when using minipages (or \parboxes)?).

The indent from the left is set to 3cm, but can be modified. Also, if a paragraph indent is required, use \indent within the minipage. All of the afore-mentioned modification can be automated. One caveat is that it will not allow breaking across the page boundary.


A rather crude way of doing it as well is to modify \leftskip:

\documentclass{article}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\begin{document}
\lipsum[1]

\setlength{\leftskip}{3cm}

\lipsum[2]

\setlength{\leftskip}{0pt}

\lipsum[3]
\end{document}
​