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.

User MMM recommended that I use the new autonum package in reply to my query. However, I am having some difficulty getting the package to work. Here is a minimal working example that 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}

I assume I am not using the package right, but I am not sure what exactly I am doing wrong.

Also, here is the file list for the LaTeX=>PDF compile.

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
cleveref.sty    2011/01/19 v0.17.8 Intelligent cross-referencing
 autonum.sty    2012/06/21 v0.2 autonum LaTeX package
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
 textpos.sty    2012/06/01 v1.7h
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
 ***********

And the .log file:

This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=pdflatex 2012.7.8)  8 JUL 2012 05:05
entering extended mode
**E:/programming/latex/minimal-examples/autonum.tex
(E:/programming/latex/minimal-examples/autonum.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.
(E:\programfiles\MiKTeX2.8\tex\latex\base\article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(E:\programfiles\MiKTeX2.8\tex\latex\base\size10.clo
File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(E:\programfiles\MiKTeX2.8\tex\latex\ams\math\amsmath.sty
Package: amsmath 2000/07/18 v2.13 AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.
(E:\programfiles\MiKTeX2.8\tex\latex\ams\math\amstext.sty
Package: amstext 2000/06/29 v2.01

(E:\programfiles\MiKTeX2.8\tex\latex\ams\math\amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks14
\ex@=\dimen103
))
(E:\programfiles\MiKTeX2.8\tex\latex\ams\math\amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
(E:\programfiles\MiKTeX2.8\tex\latex\ams\math\amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count87
LaTeX Info: Redefining \frac on input line 211.
\uproot@=\count88
\leftroot@=\count89
LaTeX Info: Redefining \overline on input line 307.
\classnum@=\count90
\DOTSCASE@=\count91
LaTeX Info: Redefining \ldots on input line 379.
LaTeX Info: Redefining \dots on input line 382.
LaTeX Info: Redefining \cdots on input line 467.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 567.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 568.
\macc@depth=\count92
\c@MaxMatrixCols=\count93
\dotsspace@=\muskip10
\c@parentequation=\count94
\dspbrk@lvl=\count95
\tag@help=\toks15
\row@=\count96
\column@=\count97
\maxfields@=\count98
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2666.
LaTeX Info: Redefining \] on input line 2667.
)
(C:\Users\<User>\AppData\Roaming\MiKTeX\2.8\tex\latex\cleveref\cleveref.sty
Package: cleveref 2011/01/19 v0.17.8 Intelligent cross-referencing
Package cleveref Info: loaded `english' language definitions on input line 5263
.
)
(C:\Users\<User>\AppData\Roaming\MiKTeX\2.8\tex\latex\autonum\autonum.sty
Package: autonum 2012/06/21 v0.2 autonum LaTeX package

(C:\Users\<User>\AppData\Roaming\MiKTeX\2.8\tex\latex\etoolbox\etoolbox.sty
Package: etoolbox 2011/01/03 v2.1 e-TeX tools for LaTeX

(E:\programfiles\MiKTeX2.8\tex\latex\misc\etex.sty
Package: etex 1998/03/26 v2.0 eTeX basic definition package (PEB)
\et@xins=\count99
)
\etb@tempcnta=\count100
)
(C:\Users\<User>\AppData\Roaming\MiKTeX\2.8\tex\latex\textpos\textpos.sty
Package: textpos 2012/06/01 v1.7h

Package: textpos 2012/06/01 1.7h, absolute positioning of text on the page
(C:\Users\<User>\AppData\Roaming\MiKTeX\2.8\tex\latex\ms\everyshi.sty
Package: everyshi 2001/05/15 v3.00 EveryShipout Package (MS)
)
\TP@textbox=\box28
\TP@holdbox=\box29
\TPHorizModule=\dimen112
\TPVertModule=\dimen113
\TP@margin=\dimen114
\TP@absmargin=\dimen115

Grid set 16 x 16 = 38.39343pt x 49.68562pt
\TPboxrulesize=\dimen116
\TP@ox=\dimen117
\TP@oy=\dimen118
\TP@tbargs=\toks19
\TP@prevdepth=\dimen119
TextBlockOrigin set to 0pt x 0pt
)
\c@autonum@counter=\count101
) (E:\programming\latex\minimal-examples\autonum.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.

ABD: EveryShipout initializing macros
Underfull \hbox (badness 10000) detected at line 5
 []$[]    $ 
 []


LaTeX Warning: Reference `eq:eq1' on page 1 undefined on input line 10.

[1

{C:/Users/<User>/AppData/Local/MiKTeX/2.8/pdftex/config/pdftex.map}]
(E:\programming\latex\minimal-examples\autonum.aux)

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
cleveref.sty    2011/01/19 v0.17.8 Intelligent cross-referencing
 autonum.sty    2012/06/21 v0.2 autonum LaTeX package
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
 textpos.sty    2012/06/01 v1.7h
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
 ***********


LaTeX Warning: There were undefined references.

 ) 
Here is how much of TeX's memory you used:
 2606 strings out of 495285
 44952 string characters out of 3180519
 139985 words of memory out of 3000000
 5849 multiletter control sequences out of 15000+200000
 4402 words of font info for 17 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 30i,9n,31p,841b,210s stack positions out of 5000i,500n,10000p,200000b,50000s
<E:/programfiles/MiKTeX2.8/fonts/type1/public/amsfonts/cm/cmbx10.pfb><E:/prog
ramfiles/MiKTeX2.8/fonts/type1/public/amsfonts/cm/cmmi10.pfb><E:/programfiles/M
iKTeX2.8/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on autonum.pdf (1 page, 30636 bytes).
PDF statistics:
 18 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
share|improve this question
    
It works for me. Did you compile twice? –  JLDiaz Jul 8 '12 at 11:53
    
At least 10 times! LaTeX=>PS=>PDF, btw. –  fg nu Jul 8 '12 at 11:55
    
Hm... then paste your .log or a link to it –  JLDiaz Jul 8 '12 at 11:58
    
I'd suggest you add \listfiles to your input and edit the resulting *File List* into the question. –  Joseph Wright Jul 8 '12 at 12:02
    
Added file list and log file. –  fg nu Jul 8 '12 at 12:10
show 2 more comments

1 Answer 1

up vote 9 down vote accepted

In its current version, the autonum package breaks support for special characters in label names. Thus, characters like the colon or digits are not allowed at the moment and must be changed.

The technical reason is, that the label name is used as part of a newly created command when an equation is referenced. This command is saved into the aux file and during the next run the label gets a number if this command is available in the aux file. As a command name must not contain special characters, the observed limitation occurs.

I think I have to ask a separate question to get a better solution to this problem, as it exceeds my TeX knowledge.

Update: a command name may contain special characters if created correctly.

Update 2: There is a new version available, fixing the bug.

Update 3: Version 0.3.6 should fix the bug once and for all. Unfortunately, there was a regression not covered by the test suite.

share|improve this answer
    
Thanks MMM. I will await that update to the autonum package which is already very nearly what I need. Since my original problem remains compatibility with a very large document which follows that labeling convention, the ability of autonum to process special characters will be very useful indeed. –  fg nu Jul 16 '12 at 21:13
    
Amazing work, @MMM. –  fg nu Aug 13 '12 at 8:02
1  
The current version, v0.3.5(2013/06/15) doesn't support names with special characters again, I guess the version where it was supported just did so unintentionally, not as a feature –  pascal Jul 8 '13 at 8:09
    
Special characters seem to be no problem in version 0.3.5 in general, as they were added to the test suite when the bug occured the first time and releases are only done if the test suite passes all tests. There might be a regression in specific situations, which I am not aware of, as I haven't seen a problematic document, yet. As already written privately, I hope we can solve the problem, if there is a minimal example demonstrating it. –  Patrick Häcker Jul 13 '13 at 16:08
    
@MMM Sorry, but for me things are broken with v0.3.5 and a label such as eq:a: in the .aux you see \xdef\autonum@eq:bReferenced{} rather than what I'd expect, @namedef{autonum@eq:bReferenced}{}. I'm following up on tex.stackexchange.com/questions/119737, but found the problem when I stripped out the other packages. –  Joseph Wright Aug 19 '13 at 8:03
show 1 more comment

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.