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

With an up to date TL 2015, the following minimal example:

% \RequirePackage{etex}
\documentclass{article}

\usepackage{l3keys2e}
\usepackage{titlesec}
\usepackage{adjustbox}
\usepackage{footmisc}
\usepackage{booktabs}
\usepackage{mathtools}
\usepackage{microtype}
\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{glossaries}
\usepackage{autonum}

\begin{document}
\end{document}

is non working:

Package etex Warning: Extended allocation already in use.
(etex)                etex.sty code will not be used.
(etex)                To force etex package to load, add
(etex)                \RequirePackage{etex}
(etex)                at the start of the document.

)
! Undefined control sequence.
l.905 \globcount
                \ettl@for@nested
? 
! Undefined control sequence.
l.905 \globcount\ettl@for@nested

?

because of the autonum package. But, it becomes working as soon as:

  • either one of the packages before autonum is removed (not relevant in my case: I need these packages),
  • or autonum is loaded before the other packages (not relevant in my case: I also need the cleveref package which is required to be loaded as the last one, with two exceptions: hypdvips and... autonum),
  • or the etex package is loaded, as suggested in the above warning (but this package is nowadays considered as obsolete).

Do you understand what's going on? Is it safe to use etex though it is obsolete?

share|improve this question
    
It should be safe; please tell the author to update the package. – egreg Jan 4 at 17:13
    
@egreg What kind of update the author should perform? – Denis Bitouzé Jan 4 at 17:14
    
Not calling etex, for instance. Which means not using etextools, which is buggy and not recommended. – egreg Jan 4 at 17:15
    
Since this is a package bug, i suggest closing this question. – Johannes_B Jan 4 at 17:24
    
@Johannes_B: Okay, I close it. – Denis Bitouzé Jan 8 at 15:58
up vote 9 down vote accepted

The autonum package loads etextools, a package I don't recommend using and that has been declared “dead” by its author, as far as I remember.

For strange reasons, after loading etex, the package has a declaration \globcount\ettl@for@nested which could have been \newcount from the beginning.

Workaround: define \globcount to be \newcount before loading autonum.

\documentclass{article}

\usepackage{l3keys2e}
\usepackage{titlesec}
\usepackage{adjustbox}
\usepackage{footmisc}
\usepackage{booktabs}
\usepackage{mathtools}
\usepackage{microtype}
\usepackage{enumitem}
\usepackage{bookmark}
\usepackage{glossaries}

%\expandafter\def\csname ver@etex.sty\endcsname{3000/12/31}
\let\globcount\newcount
\usepackage{autonum}

\begin{document}
\end{document}

Uncomment the line starting with % if you also want to get rid of the warning about etex.

share|improve this answer
    
Your solution does not scale well. The code will break on January 1st, 3001. In other words, have my upvote ;) – Henri Menke Jan 4 at 23:45
1  
@HenriMenke I did it with the secret hope that by 3001-01-01 these issues will have been straightened up: LaTeX3 will have been released. Perhaps. – egreg Jan 4 at 23:47
1  
It's not even the year 3001 yet and an update to etex.sty (version 2.5) has been submitted to ctan to address this issue. – David Carlisle Jan 7 at 14:16

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.