# Subequation number not shown (empheq+amsart)

This is a Follow-up question to Number equations within array

In the original post I was asking about the basics of subnumbering equations and I got satisfactory answers so I could implement the examples in my work (those examples in the answers run properly).

But I continue to have a problem with the use of empheq package: I don't know why the references to the equations are well created in the pdf but the correspondent numbers do not appear near the equations. How Can I solve this problem? I Isolate the problem and show it on the Minimal Working Example (MWE) and at the output attached.

\documentclass[a4paper,12pt,reqno]{amsart}
%\usepackage{amsmath}
\usepackage{empheq} % autoload amsmath
\numberwithin{equation}{section}
\newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}} % derivada parcial

\begin{document}
\section{Some Stuff}
%\subsection{Sub-Some Stuff}

Example working with simple numbering (\ref{A} - OK):
$$\left\{ \def\arraystretch{1.8} \begin{array}{l} \pderiv{x}{l} = (\sin\theta\cos\phi) \pderiv{r}{l} +(r\cos\theta\cos\phi) \pderiv{\theta}{l} +(-r\sin\theta\sin\phi) \pderiv{\phi}{l} \\ \pderiv{y}{l} = (\sin\theta\sin\phi) \pderiv{r}{q} +(r\cos\theta\sin\phi) \pderiv{\theta}{q} +(r\sin\theta\cos\phi) \pderiv{\phi}{q} \\ \pderiv{z}{l} = (\cos\theta) \pderiv{r}{\xi} +(-r\sin\theta) \pderiv{\theta}{\xi} +(0) \pderiv{\phi}{\xi} \\ \mbox{(\textbf{some text})} . \end{array} \right. \label{A}$$

Below, some example using empheq package NOT WORKING WELL.

\begin{subequations}
\label{B}
\begin{empheq}[left={ }\empheqlbrace]{align}
\pderiv{\phi}{l}    &= 0  \label{B1}  \\
\pderiv{\phi}{q}    &= 0  \label{B2}  \\
\pderiv{\phi}{\xi}  &= 1  \label{B3}
\end{empheq}
\end{subequations}
(\textbf{references ARE OK}, \ref{B}, \ref{B1}, \ref{B2}, \ref{B3}, but numbers correspondent to each equation do not show at the right).
\end{document}


That same example worked with subnumcases package (the references were OK and the numbers were there).

And below yet a example with the same problem for empheq (\textbf{references ARE OK}, \ref{C}, \ref{C1}, \ref{C2}, \ref{C3}, but numbers correspondent to each equation do not show at the right) and in which I was not able to convert even with subnumcases package because of the splitting in multiple lines (some must be without number).

\begin{subequations}
\label{C}
\begin{empheq}[left={ }\empheqlbrace]{align}
\pderiv{x}{q}
&= \sin\theta\cos\phi\left( \frac{R_E\sin^4\theta}{1+3\cos^2\theta} \right)
+ r\cos\theta\cos\phi \nonumber \\
&\left( \frac{-2R_E\sin^3\theta\cos\theta}{r(1+3\cos^2\theta)} \right)
=\frac{R_E\sin^5\theta\cos\phi}{(1+3\cos^2\theta)}
-\frac{2R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)} - \nonumber \\
& = \frac{R_E\sin^3\theta\cos\phi}{(1+3\cos^2\theta)}
\frac{R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)}
- \frac{2R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)} \nonumber \\
&= \frac{R_E\sin^3\theta\cos\phi(1-3\cos^2\theta)}{(1+3\cos^2\theta)} \label{C1} \\
\pderiv{y}{q} &= \frac{R_E\sin^5\theta\sin\phi}{(1+3\cos^2\theta)}
-\frac{2R_E\sin^3\theta\cos^2\theta\sin\phi}{(1+3\cos^2\theta)} \nonumber \\
&= \frac{R_E\sin^3\theta\sin\phi(1-3\cos^2\theta)}{(1+3\cos^2\theta)} \label{C2} \\
\pderiv{z}{q} &= \frac{R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}
+\frac{2R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}
= \frac{3R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}  \label{C3}
\end{empheq}
\end{subequations}

-
It is an issue with amsart, switching to article and it works as expected. BTW: the above is not minimal. There is no reason for the math be so complicated. –  daleif Nov 25 '13 at 8:52
agreed...Actually I isolate the problem but it is not reduced to the minimal as it should (I just cut and paste some of my equations.... and lets lots of comments also). Thanks –  Claudia Nov 25 '13 at 14:24
I've setup a ticket on this issue. Though I do not know when I have the time to fix it. –  daleif Nov 26 '13 at 10:13

## 1 Answer

The problem is that amsart loads amsmath in a way that it is not compatible with empheq, at least with respect to the reqno option. You can work round this by loading the package first, before the document class:

\RequirePackage[reqno]{amsmath}
\documentclass[a4paper,12pt]{amsart}

\usepackage{empheq}
\numberwithin{equation}{section}

\newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}}

\begin{document}

\section{Some Stuff}

\begin{subequations}
\begin{empheq}[left={ }\empheqlbrace]{align}
\pderiv{\phi}{l}    &= 0  \label{B1}  \\
\pderiv{\phi}{q} &= 0 \label{B2}
\end{empheq}
\end{subequations}

\end{document}

-
yes the problem is in fact due to this incompatibility of empheq and amsart... \RequirePackage[reqno]{amsmath} seems to make it work. But there is still problem with that last example with multiple spliting... The numbers appear bellow and no on the side of the equation, why? –  Claudia Nov 25 '13 at 14:49
The failure in the last example is due to the long lines, shortened them so that there is room for the labels and it goes away. –  Andrew Swann Nov 25 '13 at 15:21
The problem with that last example seems to occur in ordinary article documents where the equation is close to the width of the text block and there is no room for the tag. –  Andrew Swann Nov 25 '13 at 19:19
if I remember well in the ordinary article, the equation overwrites the number when that situation occur. But it worked in that case also if I shorten the lines. Thank you! –  Claudia Nov 25 '13 at 20:01