# ntheorem environment with indentation

Considering this post theorem environment with hanging indentation and Stefan's answer, I'd be interested in the same approach with ntheorem. I've been through the .sty file but I have hard time finding where the beginning and the end of the theorem environments are defined.

-

You can use the predefined commands of ntheorem to manipulate the style. In the example I uses \theoremstyle{break} do set the global style.

\theoremindent is used to set the indention of the whole environment.

theoremheaderfont is used befor every header. So I use this command to "reindent" the \theoremindent

\documentclass{article}
\usepackage{ntheorem}
\theoremstyle{break}
\theoremindent=2cm

\newtheorem{defi}{Definition}

\usepackage{showframe,lipsum}
\begin{document}
\begin{defi}
\lipsum[1]
\end{defi}
\end{document}

-
I was just going to give this same solution ;-) –  Gonzalo Medina Nov 12 '11 at 20:06
@GonzaloMedina: The first time I am faster as you ;-) –  Marco Daniel Nov 12 '11 at 20:07
indecently smart! –  pluton Nov 12 '11 at 20:26

Here we define a theorem style quote, which is similar to the break style but uses a quote environment in addition. As example, I took the theorem example from your link.

\documentclass{article}
\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{quote}%
##1\ ##2\theorem@separator}\hbox{\strut}}}]\quote}%
##1\ ##2\ (##3)\theorem@separator}\hbox{\strut}}}]\quote}
\makeatother
\theorempostwork{\endquote}
\theoremstyle{quote}
\newtheorem{thm}{Theorem}
\begin{document}
\section*{The Theorem of Pythagoras}
Text body. Text body. Text body.
\begin{thm}%[Pythagoras]
Let $a,b,c$ the sides of a rectangular triangle.
Without loss of generality, we assume that  $a<b<c$ .
Then, the following equality holds:
$a^2 + b^2 = c^2$
\end{thm}
\noindent More text. And even more text.
\end{document}


-
Thanks. I already modified this portion of the code for other purposes but I could not guess it was possible to embed the quote environment here. –  pluton Nov 12 '11 at 20:25