This question led to a new package:

I know that cleveref is not compatible with showonlyrefs as it says in the cleveref manual. But I have a book-length document that depends on showonlyrefs and I would like to start using cref without having to go back and add a \notag to each of the equations that I do not want to assign a number to.

Is there a known hack or an easy way to use cref? I have recently begun to appreciate the power of cleveref and would like to use it without going back and changing each and every one of my equations.


You can use the autonum package for that, as it is compatible with cref (but mind the package loading order as described in the manual). In its current version it only supports the equation environment, but I am working on supporting other amsmath environments, too.

Update In its new version 0.2, multi-line equations are supported, so using align should not be a problem (just uploaded, so it might take some time to appear on all mirrors).

| improve this answer | |
  • Thanks! But I use the align environment to typeset math by default, unfortunately. :( – tchakravarty Jun 2 '12 at 8:30
  • Thanks so much. I am not working on that project at the moment, but I will be sure to report back once I start using it. Thanks again. – tchakravarty Jun 22 '12 at 4:12
  • Hi MMM, I finally got around to trying out the autonum package, but can't see to get it to work. Here is a minimal example which compiles with "undefined references": \documentclass{article} \usepackage{amsmath, cleveref} \usepackage{autonum} \begin{document} \begin{align}\label{eq:eq1} a = b+c \end{align} Refer to equation \cref{eq:eq1}. \end{document} – tchakravarty Jul 8 '12 at 11:41
  • @FgNu, I did not implement support for special characters in label names. If you change the label name eq:eq1 into eqFirst, everything should work. – Patrick Häcker Jul 16 '12 at 20:54
  • 1
    For the records: Special characters are supported in more recent versions. – Patrick Häcker Sep 21 '12 at 21:11

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.