3

I am having problems trying in declaring a theorem style. I would like the first row of the definition to be on a new line with the normal indent. If I try to add \par instead of \newline for postheadspace, I am getting error. Also postheadhook doesn't seem to work.

Thank you in advance :)

\documentclass[12pt,reqno]{amsbook}

\usepackage{thmtools}

\declaretheoremstyle[
headfont=\scshape\bfseries, 
headindent = \parindent,
postheadhook = {\hspace{0mm}\newline},
postheadspace = \newline, 
spaceabove = 0.5cm, 
spacebelow = 0.5cm]{mydef}

\newtheorem{Theorem}{Theorem}[chapter]

\theoremstyle{mydef}

\newtheorem{Definition}[Theorem]{Definition}
\begin{document}

\begin{Definition}
This is a very long definition which i want to start with indent on the next row instead of from the beggining

Like this
\end{Definition}

\end{document}

enter image description here

2 Answers 2

3

For your style to properly apply, you need to use \declaretheorem to define your structure and not \newtheorem. Using postheadhook = {\hspace*{\parindent}} you'll get the desired output (I left the Theorem structure with \newtheorem since apparently it shouldn't have the mydef style; if you want to apply this style for Theorem, please use \declaretheorem instead; if you don't wnat the indentation for the head, delete the line headindent = \parindent):

\documentclass[12pt,reqno]{amsbook}
\usepackage{thmtools}

\declaretheoremstyle[
headfont=\scshape\bfseries, 
headindent = \parindent,
postheadhook = {\hspace*{\parindent}},
postheadspace = \newline, 
spaceabove = 0.5cm, 
spacebelow = 0.5cm]{mydef}

\newtheorem{Theorem}{Theorem}[chapter]
\declaretheorem[style=mydef,numberlike=Theorem]{Definition}

\begin{document}

\begin{Definition}
This is a very long definition which will start with indent on the next row instead of from the beginning.

Like this
\end{Definition}

\end{document}

enter image description here

0
1

Here is another solution:

\documentclass[12pt,reqno]{amsbook}

\usepackage{thmtools}

\declaretheoremstyle[
headfont=\scshape\bfseries, 
headindent = \parindent,
postheadhook = {\hspace{0mm}\newline},
spaceabove = 0.5cm, 
spacebelow = 0.5cm]{mydef}

\newtheorem{Theorem}{Theorem}[chapter]

\theoremstyle{mydef}

\newtheorem{DefinitionAux}[Theorem]{Definition}
\newenvironment{Definition}{\begin{DefinitionAux}\leavevmode\par}{\end{DefinitionAux}}
\begin{document}

\begin{Definition}
This is a very long definition which i want to start with indent on the next row instead of from the beggining

Like this
\end{Definition}

\end{document}

1

Here are some links to related questions:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .