TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I always wanted to have a package like autonum. Well, it is finally here and its development is still under way, but I already have two problems:

  1. It does not work with eqnarray.

  2. When referencing to equation, there appears space in front of the number, e.g. ( 3).

Is that already possible to resolve or we'll have to wait?



a = g,\\
a = g.

a = g.

Reference to: (\ref{tlabel})

a = g.

share|improve this question
Why not to use eqnarray – clemens Aug 22 '12 at 12:15
And by autoref you mean autonum? – Jonas Nyrup Aug 22 '12 at 12:23
up vote 6 down vote accepted

It is a bug in the new package autonum. A line end in the definition of \autonum@generatePatchedReferenceGeneral is not commented. (Another candidate for unwanted white spaces is \autonum@possiblyHideNumber.)

At a quick glance I didn't find any relevant white spaces at the line end, therefore disabling the line ends helps:


Or a little more defensive:

\endlinechar=-1 %

Also there is another problem, at \begin{document} an underfull \hbox warning is printed.

Further remarks:

  • The environment eqnarray is not recommended, see Kurt's answer or l2tabu

  • "Autonumbering" might be useful for the writer, but it forgets the reader. The equation number help to identify the equation. Referencing inside the text is just one application. Others might want to reference an equation of your work as well, but they can't because the number is missing. Therefore all equations or at least all relevant equations should be numbered, not only the equations that are referenced in the text.

share|improve this answer
l2tabu is full of interesting suggestions. Good reading! – Pygmalion Aug 22 '12 at 14:39
Thanks for directly giving the solution to the problems. I just uploaded version 0.3.1, which should fix these problems. – Patrick Häcker Aug 25 '12 at 16:13

Well, not the answer you expect, but I would say: "Do not use eqnarray".

See the question \eqnarray vs \align for an explanation.

share|improve this answer
I am actively using latex for 15 years and only now I am aware of that... Thanks – Pygmalion Aug 22 '12 at 14:40

Your Answer


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.