linebreak in list in indented theorem
I'm trying to make an indented theorem environment as in A theoremstyle with complete indentation using amsthm.
Here's a minimal (non-)working example:
\documentclass{article}
\usepackage{amsthm}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\newtheoremstyle{indent}
{3pt}% space before
{3pt}% space after
{
\setlength{\leftskip}{2.5em}
\setlength{\rightskip}{2.5em}
\addtolength{\@totalleftmargin}{2.5em}
}% body font
{}% indent
{\bfseries}% header font
{.}% punctuation
{.5em}% after theorem header
{}% header specification (empty for default)
\makeatother
\theoremstyle{indent}\newtheorem{theorem}{Theorem}
\begin{document}
\blindtext
\begin{theorem}[correct spacing]
\blindtext
\begin{itemize}
\item This is ok.
\item \blindtext
\end{itemize}
\end{theorem}
\end{document}
Whether or not I add that extra rightskip, my problem is that as soon as an item in a list within my theorem gets longer than one line (as in the third blindtext) it extends over the original right margin of the page, a case not considered in the original post.
Any suggestions?
I'm trying to make an indented theorem environment as in A theoremstyle with complete indentation using amsthm.
Here's a minimal (non-)working example:
\documentclass{article}
\usepackage{amsthm}
\usepackage[english]{babel}
\usepackage{blindtext}
\makeatletter
\newtheoremstyle{indent}
{3pt}% space before
{3pt}% space after
{
\setlength{\leftskip}{2.5em}
\setlength{\rightskip}{2.5em}
\addtolength{\@totalleftmargin}{2.5em}
}% body font
{}% indent
{\bfseries}% header font
{.}% punctuation
{.5em}% after theorem header
{}% header specification (empty for default)
\makeatother
\theoremstyle{indent}\newtheorem{theorem}{Theorem}
\begin{document}
\blindtext
\begin{theorem}[correct spacing]
\blindtext
\begin{itemize}
\item This is ok.
\item \blindtext
\end{itemize}
\end{theorem}
\end{document}
Whether or not I add that extra rightskip, my problem is that as soon as an item in a list within my theorem gets longer than one line (as in the third blindtext) it extends over the original right margin of the page, a case not considered in the original post.
Any suggestions?
No comments:
Post a Comment