Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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

share|improve this answer
    
Thanks! But I use the align environment to typeset math by default, unfortunately. :( –  fg nu 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. –  fg nu 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} –  fg nu 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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