Changing margins for just one paragraph

If you want to indent a paragraph just by a certain length but the standard LaTeX environments don’t meet the requirements you could use the TeX primitive \leftskip. To limit its effect it can be enclosed in \begingroup … \endgroup. The equivalent for the right margin is \rightskip. Here’s an example:

\documentclass[a4paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\parindent0em
\parskip\baselineskip
\begin{document}
\blindtext
\par
\begingroup
\leftskip4em
\rightskip\leftskip
\blindtext
\par
\endgroup
\blindtext
\end{document}

A downscaled screenshot of the output:

paragraph with different left and right margin

This topic was discussed on Matheplanet and ChemieOnline.

02. May 2008 by stefan
Categories: Uncategorized | 3 comments

Comments (3)

Leave a Reply