1

Emacs has been my LaTex editor for several years. Along with AucTex, I have been using the label/ref management utility for emacs supplied by aux-renum.el. It's available on the CTAN archive at

aux-renum.el

However, when I fired it the other day I ran into an error:

invalid read sytax: "#"

If anyone has updated the aux-renum package to work with the current version of emacs, I would greatly appreciate knowing how to get a copy of a working version. Thanks in advance.

  • 1
    Does your TeX document use the hyperref package? If so, turn it off and try aux-renum.el again. – Fran Burstall Aug 19 '21 at 01:18
  • How do you "fire" it exactly? Have you checked you haven't edited it (or another config file) inadvertently? – JeanPierre Aug 19 '21 at 11:47
  • 2
    Let me be more explicit about the issue: if yr LaTeX document has \usepackage{hyperref} in it, then the .aux file has a format that aux-renum.el does not expect (no surprise: pdf was not a thing when it was written). This causes aux-renum.el to write garbage to a temporary buffer on which it does an eval-buffer and this provokes the read error. – Fran Burstall Aug 19 '21 at 14:04
  • @FranBurstall Many thanks! Disabling hyperref solved my problem. – Theodore Slaman Aug 19 '21 at 17:32
  • @JeanPierre thanks for responding. Firing up meant loading the file aux-renum.el and invoking the command aux-renumber-single. – Theodore Slaman Aug 19 '21 at 17:33
  • @franburstall that would make a good answer! That sort of interaction can be very tricky to track down – Tyler Aug 19 '21 at 22:57

1 Answers1

2

Short answer: your TeX document is using the hyperref package. Simply turn it off by commenting out the

\usepackage{hyperref}

line and try to use aux-renum.el again.

Longer answer: aux-renum.elparses the LaTeX document's .aux file and writes what it finds into a temporary buffer on which it runs eval-buffer. Meanwhile, hyperref completely subverts the .aux, redefining \newlabel among other things. Put the two together and aux-renum writes garbage into the temporary buffer and then tries to read it. Hence the error.

It is hard to blame aux-renum for this: it was written in 1995 before PDF took off and hyperref became almost mandatory.

Fran Burstall
  • 3,855
  • 11
  • 18