[Tex/LaTex] Minipage that allows page breaks

indentationminipagepage-breaking

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.

Best Answer

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.

Related Question