50

Possible Duplicate:
Indenting a whole paragraph
Write text with some fixed amount of space from the margin

I would like to indent a paragraph or two for a specific amount.

The quote environment is not suitable, since indentation width is not configurable.

An article suggested using {\addtolength{\leftskip}{5mm} text}, but that doesn't work for me.

Another article suggested a very hacky way, which involved temporarily modifying global margins.

Is there a clean solution for this?

4

1 Answer 1

62

You may use addmargin environment of either a KOMA-Script class or the KOMA-Script package scrextend. Here an example with a standard class and package scrextend:

\documentclass{article}
\usepackage{scrextend}
\usepackage{lipsum}% for demo only!
\begin{document}

\lipsum[1]
\begin{addmargin}[1em]{2em}% 1em left, 2em right
\lipsum[2]
\end{addmargin}
\lipsum[3]
\end{document}

Results in:

enter image description here

5
  • 13
    A tip for other sloppy readers: the package is s c r extend, not s r c extend.
    – ntc2
    Commented Mar 20, 2014 at 5:59
  • 2
    An alternative is \begin{adjustwidth}{1em}{1em} CONTENT \end{adjustwidth} with \usepackage{changepage}. This worked better in my case because scrextend raised a warning that I could not get rid of using the silence package. The warning was Command \@footnotemark has changed. Check if current package is valid. Commented Aug 3, 2022 at 15:15
  • @CarlosPinzón This warning does not occur with my example. Maybe you are not using an up-to-date version of scrextend. Commented Aug 23, 2023 at 9:04
  • @ntc2 I wrote scrextend not srcextend. So I do not understand your comment. Commented Aug 23, 2023 at 9:04
  • 2
    @Schweinebacke, regarding the scr/src comment, he's just warning the readers that the package name is weird, so it is easy to misread scr as src. Your answer is fine, is just to help users notice that (programmers use src very often as short for "source"). Regarding my comment, I'm working with a larger document and I got that issue. I'm just adding that if someone gets stuck in the same place, my comment might help them. We are both just complementing your answer. Commented Aug 23, 2023 at 10:04

Not the answer you're looking for? Browse other questions tagged .