[Tex/LaTex] Subequation number not shown (empheq+amsart)

amsartcasescross-referencingempheqnumbering


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):
\begin{equation}
  \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}
\end{equation}

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}

enter image description here

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}

Best 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:

Sample output

\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}