14

This question led to a new package:
autonum

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.

1 Answer 1

7

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).

5
  • Thanks! But I use the align environment to typeset math by default, unfortunately. :( Jun 2, 2012 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. Jun 22, 2012 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} Jul 8, 2012 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. Jul 16, 2012 at 20:54
  • 1
    For the records: Special characters are supported in more recent versions. Sep 21, 2012 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.