11

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.

6
  • I can confirm this
    – user31729
    Commented Jan 1, 2015 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
    Commented Jan 1, 2015 at 22:09
  • So far autonum (and some mathtools package option) are the only ways of achieving the desired automatic equation numbering, right?
    – Deniz
    Commented Jan 1, 2015 at 22:15
  • @Deniz I think so; but I also think that numbering only the referenced equations is a bad idea.
    – egreg
    Commented Jan 1, 2015 at 22:17
  • 1

1 Answer 1

11

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

17
  • 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
    Commented Jan 1, 2015 at 22:45
  • 1
    @Deniz Sorry, with split some features of etextools are indeed used. I've changed into another fix
    – egreg
    Commented Jan 1, 2015 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
    Commented Jan 1, 2015 at 23:03
  • 2
    This solution does not work, and gives ! Package biblatex Error: Incompatible package 'etextools' Commented Feb 6, 2018 at 21:32
  • 2
    @JasonGross It seems that now biblatex disallows loading etextools. You're doomed, sorry.
    – egreg
    Commented Feb 6, 2018 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .