Indent only first line of newtheorem

I have a number of hypotheses which I included by defining a newtheorem. I want the first line of the hypothesis to be indented, but have been unable to achieve this goal. The text was either not indented or the whole paragraph was it. But I just need the first line including the 'Hypothesis No.X' to be indented.

Here is a MWE:

\documentclass[a4paper, 12pt]{report}  \usepackage[ngerman]{babel} \usepackage{geometry} \usepackage{indentfirst} \usepackage{ntheorem} \usepackage{lipsum}  \geometry{outer=20mm, inner=25mm, top=20mm, bottom=30mm}  \theorembodyfont{\normalfont} \theoremseparator{:}  \newtheorem{hyp}{Hypothese}  \begin{document} \chapter{} \lipsum \begin{hyp} Here should be Hypothesis number one with first line indented and the remaining text normally over the whole page. \end{hyp}  \begin{hyp} Here is another Hypothesis with an indented first line and remaining text like in the remaining thesis. \end{hyp} \end{document} 

Replay

Add the indentation as part of the theorem header font, that is \theoremheaderfont:

Indent only first line of newtheorem

\documentclass{report}

\usepackage{indentfirst}
\usepackage{ntheorem}
\usepackage{lipsum}

\theoremheaderfont{\hspace*{\parindent}\bfseries}
\theorembodyfont{\normalfont}
\theoremseparator{:}

\newtheorem{hyp}{Hypothesis}

\begin{document}

\chapter{A chapter}
\lipsum

\begin{hyp}
Here should be Hypothesis number one with first line indented and the remaining text normally over the whole page.
\end{hyp}

\begin{hyp}
Here is another Hypothesis with an indented first line and remaining text like in the remaining thesis.
\end{hyp}

\end{document}

I defined a new theorem style, indenthead, with a new dimension, \thmheadindent, which works like \theoremindent:

\documentclass[a4paper, 12pt]{report}

\usepackage[ngerman]{babel}
\usepackage{geometry}
\geometry{outer=20mm, inner=25mm, top=20mm, bottom=30mm}%%
\usepackage{indentfirst}
\usepackage{ntheorem}
\usepackage{lipsum}
\makeatletter
\newdimen{\thmheadindent}
\global\thmheadindent0cm
\newdimen\[email protected]
\def\[email protected]
        {\the\thmheadindent}
\setlength\thmheadindent{\parindent}
\newtheoremstyle{indenthead}%
  {\item[\hskip\labelsep\hskip\[email protected] \[email protected] ##1\ ##2\[email protected]]}%
  {\item[\hskip\labelsep\hskip\[email protected] \[email protected] ##1\ ##2\ (##3)\[email protected]]}
\makeatother

\theoremstyle{indenthead}

\theorembodyfont{\normalfont}
\theoremseparator{:}
\thmheadindent \parindent
\newtheorem{hyp}{Hypothese}

\begin{document}

\chapter{}

\lipsum[11]

\begin{hyp}
Here should be Hypothesis number one with first line indented and the remaining text normally over the whole page. T \end{hyp}

\begin{hyp}
Here is another Hypothesis with an indented first line and remaining text like in the remaining thesis.
\end{hyp}

\end{document}

Indent only first line of newtheorem

Category: indentation Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.265 (s). 12 q(s)