enter image description hereI'm trying to write a null hypothesis with my thesis, and I found this question Hypothesis in latex. But when I tried it, it did not work for me, as I had a typesetting error and the xcolor and fancyhdr page were the culprits. (I dont even understand how that is possible, but then again I'm super new at this, so maybe that's not surprising).

Anyway, I've read that I can use the amsthm package to write the hypothesis, but I haven't been able to find a working example.

This is my first hypothesis.
  • What do you mean with “null hypothesis”?
    – egreg
    Commented Aug 17, 2017 at 17:37
  • I want it to be H_0 and H_1.
    – Ar1229
    Commented Aug 17, 2017 at 17:43
  • Can you please add an approximate representation of the desired output?
    – egreg
    Commented Aug 17, 2017 at 17:46
  • I need something like that, to declare my hypothesis. I know I can do it by \textbf{$H_0$}: This is my hypothesis. But I need to keep track of them, and it also feels like cheating
    – Ar1229
    Commented Aug 17, 2017 at 17:54

1 Answer 1


Is it what you want?

spaceabove=6pt, spacebelow=6pt,
notefont=\mdseries, notebraces={(}{)},
\declaretheorem[style=mystyle, name=Hypothesis, preheadhook={\renewcommand{\thehyp}{H\textsubscript{\arabic{hyp}}}}]{hyp}


 \begin{hyp}[Test hypothesis] \label{hyp:a}This is my first hypothesis. \end{hyp}
 \begin{hyp} \label{hyp:b}This is my second hypothesis. \end{hyp}



enter image description here

  • This is amazing, but it does not work for me. It says Package thmtools warning: Your backend doesn't allow theorems on input line 18. Package thmtools error, \declaretheorem key 'spaceabove' not known
    – Ar1229
    Commented Aug 17, 2017 at 22:04
  • It worked! I moved the amsmath package line up, and loading it before this. Thank you! It's exactly what I needed!
    – Ar1229
    Commented Aug 17, 2017 at 22:10
  • @Ar1229 Please accept the answer.
    – George
    Commented Aug 15, 2019 at 6:36

You must log in to answer this question.

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