16

Is there a minipage-like environment that allows pagebreaks? Everything I can find is about avoiding page breaks (which minipage does well) but I want to indent a whole section, which is convenient to do by wrapping the section in minipage as \leftskip is overtaken by the environment enclosing this section.

13

Another option is to use adjustwidth from the changepage package- see example below

\documentclass{article}
\usepackage[showframe=true]{geometry}
\usepackage{changepage}
\usepackage{lipsum}

\begin{document}

\section{Regular settings}
\lipsum

\begin{adjustwidth}{2cm}{}
\section{Adjusted settings}
\lipsum
\end{adjustwidth}

\end{document}

Note that the adjustwidth environment takes 2 arguments, the first is the indent from the left of the page, the second is the indent from the right of the page. I put showframe=true when I loaded the geometry package just for demonstration.

If you plan to use this idea at lots of different places throughout the document, it is probably worth defining your own environment, something like

\newenvironment{mywidth}{\begin{adjustwidth}{2cm}{}}{\end{adjustwidth}}

which could then be used as

\begin{mywidth}
\lipsum
\end{mywidth}

If your document is twosided then you can adjust the width different for even and odd sides- see the documentation for more details.

8

no need for a minipage, use a trivlist

\documentclass{article}
\usepackage{lipsum}
\begin{document}

\section{foo}
\begin{trivlist}\leftskip=2cm
\item\relax\lipsum[1]
\end{trivlist}

\lipsum[1]
\end{document}

enter image description here

  • 8
    This works provided that no list based environment appears within this trivlist. \begin{list}{}{\leftmargin=2cm}...\end{list} wouldn't have this problem (and is the approach taken by adjustwidth). – egreg Oct 25 '11 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.