# How to manipulate theorem body text indentation (using amsthm package)?

I would like to create the following formatting for summing up hypotheses (I am using the report documentclass):

Body text. Body text. Body text. Body text. Body text. Body text. Body text. Body text.

Hypothesis 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Phasellus iaculis imperdiet blandit.

Body text. Body text. Body text. Body text. Body text. Body text. Body text. Body text.


So far this is what I have managed to come up with (I'm trying to do it with the amsthm package):

\documentclass[11pt]{report}
\usepackage[bottom=2cm, top=2cm, left=3cm, right=2cm]{geometry}
\usepackage{lipsum}

\usepackage{amsthm}
\newtheoremstyle{hypothesis}
{5pt}
{5pt}
{\itshape}
{1cm}
{\bfseries}
{}
{.5em}
{}
\theoremstyle{hypothesis}
\newtheorem{hypo}{Hypothesis}

\begin{document}
\lipsum[1]

\begin{hypo}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus iaculis imperdiet blandit.
\end{hypo}

\lipsum[2]
\end{document}


Which produces the following:

As you can see I'm almost there. The only thing I still need now is that the hypothesis body text has the same indentation as the hypothesis head (i.e. when the hypothesis body continues on a new line, that line has to begin at the same point that the hypothesis head begins).

I feel like it has to be something very simple, but I can't seem to figure it out. Any help would be greatly appreciated.

A modification of https://tex.stackexchange.com/a/106582/4427

\documentclass[a4paper]{scrartcl}
\usepackage{amsthm,thmtools}
\usepackage{etoolbox}
\usepackage{lipsum}
\usepackage{showframe}

\makeatletter
\patchcmd\@thm
{\trivlist}
{\list{}{\theoremmargins}}
{}{}
\newcommand{\xdeclaretheorem}[2][]{%
\declaretheorem[#1]{#2}%
\expandafter\patchcmd\csname thmt@original@end#2\endcsname
{\endtrivlist}{\endlist}{}{}%
}
\newcommand{\theoremmargins}{\leftmargin=0pt}
\newcommand{\theoremindent}{\leftmargin=2.5em\rightmargin=2.5em}

\declaretheoremstyle[
bodyfont=\itshape,
]{INDENTthm}

\xdeclaretheorem[
within=section,
style=INDENTthm,
name=Hypothesis
]{hyp}

\declaretheorem[
style=plain,
name=Theorem
]{thm}

\begin{document}
\lipsum[1]
\begin{thm}
\lipsum*[2]
\begin{enumerate}
\item a
\item b
\end{enumerate}
\end{thm}
\lipsum[2]
\begin{hyp}
\lipsum*[2]
\begin{enumerate}
\item a
\item b
\end{enumerate}
\end{hyp}
\end{document}


As usual, showframe is just for showing the text block boundaries.

• Hi egreg, I prefer your solution because it is more aesthetically pleasing to me personally. However, I can't seem to get rid of the "0.1" after Hypothesis. Is there a way to get it to count from 1? – idix May 16 '15 at 7:18
• @idix That's obtained by removing within=section – egreg May 16 '15 at 9:33
• Hi, sorry to come back to this, but I would like to nest the hypotheses like this: Hypothesis 1.1 The thing is that I would like to do this only with certain hypotheses. For instance, Hypothesis 1 would be on its own, and would only read Hypothesis 1. But Hypothesis 2 would have two subhypotheses so it would have to read Hypothesis 2 and its subhypotheses would read Hypothesis 2.1 and Hypothesis 2.2 – idix Jul 17 '15 at 12:36

It is quite straightforward to do it with ntheorem; there a predefined length \theoremindent:

\documentclass[11pt]{report}
\usepackage[bottom=2cm, top=2cm, left=3cm, right=2cm]{geometry}
\usepackage{amsmath}
\usepackage{lipsum}

\usepackage[thmmarks, amsmath, thref]{ntheorem}
\theoremstyle{plain}
\theoremseparator{.}
\theoremindent1\parindent
\newtheorem{hypo}{Hypothesis}

\begin{document}
\lipsum[1]

\begin{hypo}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus iaculis imperdiet blandit.
\end{hypo}

\lipsum[2]
\end{document}