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)

  1. Thanks dear. It has made life certainly easy.

  2. Thx a lot Stefan Kottwitz……

  3. try this
    newenvironment{head}
    {parsetlength{leftskip}{1cm}setlength{rightskip}{1cm}noindentignorespaces}
    begin{document}

    begin{head}
    text
    end{head}

    end{document}

Leave a Reply to Amit Cancel reply

Required fields are marked *