TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Context: I am writing a multi-chapter scientific report with many numbered hypotheses. I have created a custom hypothesis environment in the preamble:


An example of a hypothesis in the body of the document is:

There is a positive relationship between X and Y.

My Question: How can I create a custom List of Hypotheses like a Table of Contents that lists:

  • the hypothesis number (e.g.,1.1, 1.2, 2.1, etc.)
  • the text of each hypothesis in the document
  • the page number where it is recorded


 List of Hypotheses
 1.1 There is a positive relationship between X and Y .................. 32
 1.2 There is a negative relationship between something and Z........... 43


share|improve this question
up vote 6 down vote accepted

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.





\chapter*{List of Hypotheses}


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


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


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.

share|improve this answer

The ntheorem package can do this:

share|improve this answer
Thanks. This is helpful. However, by default it does not print the hypothesis text in the list. It only prints the hypothesis number and the page number. I'm having a read through the documentation to see if it supports printing the text. – Jeromy Anglim Aug 29 '10 at 14:48
It seems to take the list text from any text in square brackets: e..g., \begin{hypothesis}[This text is displayed in list]This text is not\end{hypothesis}. While I would be willing to type the text twice if necessary, the text in the square brackets also appears in my document, which prevents it from being a solution. – Jeromy Anglim Aug 29 '10 at 15:18

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




\renewcommand{\listtheoremname}{List of Hypotheses}


There is a positive relationship between X and Y.

Some text.

share|improve this answer
This produces “X-Y-relationship” in the list, while the OP wanted “There is a positive relationship between X and Y.” – Caramdir Dec 11 '10 at 17:30

In the end I decided to use Sweave. I.e., I have an Rnw file with tex and R code chunks which acts as a pre-processor for a LaTeX document.

I have a csv file which stores the hypotheses with one hypothesis per row:

  hypotheses <- read.csv("hypotheses.csv")

The following R function outputs the latex for the hypothesis environment:

outputHypothesis <- function(label, data = hypotheses) {
    result <- c("\\begin{hypothesis}",
            paste("\\label{", label, "}"),
            data[data$label==label, "text"],
    cat(result, sep="\n")

Then the Rnw file has an R code chunk which inserts the tex:


I still have to finalise the next step of actually creating the table of hypotheses, but I think I'll implement it as an R code chunk in Sweave.

One thing I've already done is use the database to display a table in the discussion section that uses the database of hypotheses as the source and shows (based on the database) whether the hypotheses were supported in a each of a set of studies:


\caption{Summary of Support for Hypotheses}
Number & Hypothesis & Study 1 & Study 2 & Study 3\\

Number & Hypothesis & Study 1 & Study 2 & Study 3\\

\multicolumn{5}{r}{\emph{Table continues on next page}} \\

<<hypothesis_table, results=tex>>=
discussionHypotheses <- paste("\\ref{", hypotheses$label, "}",
        "& ", hypotheses$text,
    " & ", hypotheses$support_study1,
    " & ", hypotheses$support_study2,
    " & ", hypotheses$support_study3,
cat(discussionHypotheses, sep ="\n") 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.