9

biblatex and autonum don't seem to work together in the newest version. Consider the following MWE:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\usepackage{autonum}

\begin{document}

\end{document}

I get the following error messages:

0 File ended while scanning use of \ettl@for@do1
0 pdflatex: \pdfmatch: repetition-operator operand invalid pdfTeX warning: pdflatex: \pdfmatch: repetition-operator operand invalid)Runaway argument?{{\blx@bibdata@i {\blx@tempb }}\blx@bibfiles \eappto \blx@tempa {\blx@xml@comme

After commenting out either biblatex or autonum, the errors disappear.

  • I can confirm this – user31729 Jan 1 '15 at 21:44
  • 1
    The problem is in the fact that autonum uses etextools that takes the liberty of redefining \forlistloop in a way that is incompatible with what biblatex expects. I don't recommend using etextools, nor any package relying on it. – egreg Jan 1 '15 at 22:09
  • So far autonum (and some mathtools package option) are the only ways of achieving the desired automatic equation numbering, right? – Deniz Jan 1 '15 at 22:15
  • @Deniz I think so; but I also think that numbering only the referenced equations is a bad idea. – egreg Jan 1 '15 at 22:17
  • @egreg That is highly context-dependent. But thanks for pointing out the problem so fast - I guess the autonum package will need to be changed? – Deniz Jan 1 '15 at 22:26
10

The problem is in the fact that autonum uses etextools. Indeed, the error is reproducible also with

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\usepackage{etextools}

\begin{document}

\end{document}

The problem is that etextools redefines \forlistloop in a way that is incompatible with what biblatex expects.

From what I see in autonum.sty, \forlistloop is not used, so it could be safe restoring it to the value biblatex is expecting. But there's no guarantee that other macros of biblatex use constructs made buggy by etextools.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}


\let\etoolboxforlistloop\forlistloop % save the good meaning of \forlistloop
\usepackage{autonum}
\let\forlistloop\etoolboxforlistloop % restore the good meaning of \forlistloop


\begin{document}

\begin{equation}
A\label{A}
\end{equation}

\begin{equation}
B\label{B}
\end{equation}

\ref{A}

\begin{equation}\label{C}
\begin{split} A\\ b \end{split}
\end{equation}

\end{document}

enter image description here

The functionality of autonum seems to be OK.

See also Incompatibility between etextools and etoolbox command \dolistloop (\forlistloop)?

  • Thanks a lot. Before we finish this: If I add the following split environment (without any labels/references), I get several errors, and again, only in connection with both autonum and biblatex. \begin{equation} \begin{split} A\\ b \end{split} \end{equation} How do I correctly address this here on StackExchange? As a new question? – Deniz Jan 1 '15 at 22:45
  • 1
    @Deniz Sorry, with split some features of etextools are indeed used. I've changed into another fix – egreg Jan 1 '15 at 22:47
  • 2
    @Deniz Sorry, but etextools is buggy and its author abandoned it. However I have no problem with align in subequations. – egreg Jan 1 '15 at 23:03
  • 1
    This solution does not work, and gives ! Package biblatex Error: Incompatible package 'etextools' – Jason Gross Feb 6 '18 at 21:32
  • 1
    @JasonGross It seems that now biblatex disallows loading etextools. You're doomed, sorry. – egreg Feb 6 '18 at 21:48

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.