1

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}
\begin{equation}\label{test2}
\overline{a}=b
\end{equation}
\end{document}

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

  • 1
    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
  • 2
    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
1

You are loading three packages all of which redefine the label handling here.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.