# Showkey with cleveref and amsmath

I have the following problem with showkeys. When use in combination with cleveref and amsmath the label for equation get some extraneous curly brackets. For example im compile the following the label for the equation will be {test2}.

\documentclass{article}
\usepackage{showkeys}
\usepackage{amsmath}
\usepackage{cleveref}
\begin{document}
\section{Test}\label{test1}
$$\label{test2} \overline{a}=b$$
\end{document}


However, if a comment either amsmath or cleveref the label get fixed, i.e only test2.

• Welcome to TeX.SX! I think you should live with the extra braces. – egreg Jul 12 '16 at 9:01
• If I don't use amsmath there is no {...} pair, even with cleveref – user31729 Jul 12 '16 at 9:01
• you are loading three packages all of which redefine the label handling here. Since showkeys is just for draft usage I am, for once, inclined to agree with @egreg here. – David Carlisle Jul 12 '16 at 9:02

Since showkeys is just for draft usage and the extra braces are just in the draft label display not affecting the document typesetting I think it's safest not to try to catch this case in showkeys and simply ignore the extra braces.