Custom list of hypotheses in table of contents format

I couldn't get any of the theorem packages to produce such a list directly. So the following produces its own list using the tools provided by ntheorem. It works by adding lines directly to the list of hypolist theorems.

\documentclass{book}

\usepackage{ntheorem}
\newtheorem{hypo}{Hypothesis}[chapter]
\newtheorem{hypolist}{Hypothesis}[chapter]

\newcommand*\hypothesis[1]{%
    \stepcounter{hypolist}%
    \addtheoremline{hypolist}{#1}%
    \begin{hypo}#1\end{hypo}
}

\begin{document}

\chapter*{List of Hypotheses}
\listtheorems{hypolist}

\chapter{foo}

\hypothesis{There is a positive relationship between $X$ and $Y$.}

\chapter{bar}

\hypothesis{There is a positive relationship between $X$ and $Z$.}
\hypothesis{There is a positive relationship between $Z$ and $Y$.}

\end{document}

the list

I defined a command instead of an environment, because it is simpler and you can't use multi-paragraph entries in the list anyway.


The ntheorem package can do this:

\listtheorems{hypothesis}

You may use the thmtools package (note the different syntax for creating new theorems).

\documentclass{book}

\usepackage{amsthm}
\usepackage{thmtools}
\declaretheorem[numberwithin=chapter]{hypothesis}
\declaretheorem[numberwithin=chapter]{theorem}

\begin{document}

\renewcommand{\listtheoremname}{List of Hypotheses}
\listoftheorems[ignoreall,show={hypothesis}]

\chapter{foo}

\begin{hypothesis}[X-Y-relationship]
There is a positive relationship between X and Y.
\end{hypothesis}

\begin{theorem}
Some text.
\end{theorem}

\end{document}