# Problem with ntheorem, mathtools and cleveref

I have two (related) problems.

I'm writing a project where the following is part of my preamble:

\documentclass[a4paper,11pt,oneside]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage{mathtools}
\usepackage{cleveref}
\mathtoolsset{showonlyrefs}


The first problem is that with the preamble above, the following example shows the reference to the second equation with the number '2' when it should be '1', and the tag is not shown next to the equation.

The second problem is that if I don't load the cleveref-package, the same example now shows the tag but the number is now '3'.

If I don't load the cleveref-package and if I remove the option thmmarks from the ntheorem-package, the example works well.

What do I do to correct this?

Here's the full example showing the problem:

\documentclass[a4paper,11pt,oneside]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage{mathtools}
\usepackage{cleveref}
\mathtoolsset{showonlyrefs}

\begin{document}
This is the first equation:
\begin{equation}
a^2 + b^2 = c^2\label{eq1}
\end{equation}
This is the second equation:
\begin{equation}
\alpha^2 + \beta^2 = \gamma^2\label{eq2}
\end{equation}
This line is referring to the second equation, \eqref{eq2}.
\end{document}


I might also want to point out I did the compiling on Windows with TeXLive 2010 when I wrote the post. I am now on Ubuntu with TeXLive 2009. The result is slightly different. With the preamble as it is, I now get ([equation]2) as the referring number, and no tag is shown.

(I apologize for the lack of example in the original post.)

It turned out to be a compatibility issue between cleveref and memoir. As the OP wrote: Not loading cleveref and loading \usepackage[overload,ntheorem]{empheq} before ntheorem fixed the problem. See the section 3.2.2 Showing only referenced tags p. 11 in the mathtools manual (v1.10, last revised 2011/02/12).