# showlabels problems with subequations

I would like to resume the post on the \usepackage{showlabels} for a moment

working on some things, I found this code very handy, but I saw that when I activate the \usepackage{showlabels}, from these problems. what could it be?

\documentclass[a4paper,10pt]{article}

\usepackage{amsmath}
\usepackage{empheq}
\usepackage{showlabels} %%<------

\begin{document}
We refer to the subequation \eqref{eq079.1} end \eqref{eq079.2} and the whole equation (\ref{eq:all}).
\begin{subequations}
\label{eq:all}
\begin{empheq}[left={\empheqlbrace\,}]{align}
&\rho = \rho+\quad \text{con}\quad \tilde{\rho}\ll\rho_{0}  \label{eq079.1}
\\ \nonumber \\
&p = p_{0} + \tilde{p} \quad \text{con}\quad p_{_{0}} = \cdots\quad  \text{e}\quad  \tilde{p}\ll p_{0}\label{eq079.2}
\end{empheq}
\end{subequations}

\end{document}


• Interesting, apparently something about the interaction between showlabels and empheq has changed since 2014. This answer, which worked back then, now suffers from the same problem. – Circumscribe Nov 20 '18 at 18:38
• With TeX Live 2015 the output is correct, it starts to be mangled with TeX Live 2016 on. – egreg Nov 20 '18 at 18:46
• @egreg therefore, it does not have a solution, but it is a problem between the two packages. – Antonio Nov 20 '18 at 19:05
• A change to showlabels for enhancing compatibility with amsmath results in the label printed twice, one without the shift due to \empheqlbrace\, and one with. Indeed, if you remove the left= option, you'll not see the issue, because the double labels overprint each other. I can't see a workaround, sorry. Both showlabels and empheq hook in \maketag@@@ and conflict arises. – egreg Nov 20 '18 at 21:31
• Hrumph: some fraction of my grey hairs are due to my tiptoeing around \maketag@@@ trying not to get my (and showlabels') heels bitten. I've opened an issue noting this, and I'll address that when I can. The incompatibility does appear to have been a change between showlabels v1.7 and v1.8, so a bit of bisection should help me narrow it down further. Thanks for finding this. – Norman Gray Dec 9 '18 at 19:34

## 1 Answer

You could use showkeys instead

\documentclass[a4paper,10pt]{article}

\usepackage{amsmath}
\usepackage{empheq}
\usepackage{showkeys} %%<------

\begin{document}
We refer to the subequation \eqref{eq079.1} end \eqref{eq079.2} and the whole equation (\ref{eq:all}).
\begin{subequations}
\label{eq:all}
\begin{empheq}[left={\empheqlbrace\,}]{align}
&\rho = \rho+\quad \text{con}\quad \tilde{\rho}\ll\rho_{0}  \label{eq079.1}
\\ \nonumber \\
&p = p_{0} + \tilde{p} \quad \text{con}\quad p_{_{0}} = \cdots\quad  \text{e}\quad  \tilde{p}\ll p_{0}\label{eq079.2}
\end{empheq}
\end{subequations}

\end{document}


:-)

• I must confess that the form of \usepackage{showlabels}, is much more orderly, but this is more effective. I do not like the rectangles aesthetically, thanks for the suggestion – Antonio Nov 20 '18 at 22:09