enumitem icon indicating copy to clipboard operation
enumitem copied to clipboard

Conflict with beamer in last release

Open GuillaumeBiessy opened this issue 1 year ago • 12 comments

Dear developer,

I rely on enumitem to generate beamer presentations (with RStudio / quarto / TinyTeX). Since the last update of the package 5 days ago I am no longer able to compile any file that includes enumitem and contains any enumerate environnement.

Here is a minimal example to reproduce the issue :

\documentclass{beamer}
\usepackage{enumitem}

\begin{document}
\begin{frame}{1 Example Slide}
\begin{enumerate}
\item Bla
\item Bla Bla
\end{enumerate}
\end{frame}
\end{document}

Removing \usepackage{enumitem} or replacing enumerate by itemize fixes the issue.

The associated error is: Image

I use TinyTeX with an up to date version of Tex Live 2024. Please find below the log associated with the error. Test_enumitem.log

GuillaumeBiessy avatar Jan 24 '25 21:01 GuillaumeBiessy

Seems another form of #18, which was marked fixed in enumitem v3.10 (2025/01/19), by https://github.com/jbezos/enumitem/commit/363795891fbb2ab22c2068bb1586be34153e7ba5. Wondering how your document worked before.

It seems the current (full) error message is still vague.

! Package enumitem Error: Label undefined.

See the enumitem package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.13 \end{frame}
                
The current class doesn't define some labels
for 'enumerate'. You have to do it yourself, as
explained in the manual.

Defining \labelenumi (here the roman number i denotes the first level of enumerate) does the trick. But setting \setlist[enumerate, 1]{label=\arabic*} doesn't, which I don't know why.

\documentclass{beamer}
\usepackage{enumitem}

\newcommand\labelenumi{\theenumi.}

\begin{document}
\begin{frame}{1 Example Slide}
\begin{enumerate}
  \item Bla
  \item Bla Bla
\end{enumerate}
\end{frame}
\end{document}
Image

muzimuzhi avatar Jan 25 '25 00:01 muzimuzhi

Thanks. I’ll revert the corresponding code and reopen the previous issue in a few days.

jbezos avatar Jan 25 '25 12:01 jbezos

Seems another form of #18, which was marked fixed in enumitem v3.10 (2025/01/19), by 3637958. Wondering how your document worked before.

I have used enumitem with beamer for the last 3 years or so and never had an issue before. I am positive it stopped working precisely on the 20th of January, I compiled my document several times in the previous days.

Defining \labelenumi (here the roman number i denotes the first level of enumerate) does the trick. But setting \setlist[enumerate, 1]{label=\arabic*} doesn't, which I don't know why.

Indeed it does the trick. Thank you for this quick fix !

Cheers, Guillaume

GuillaumeBiessy avatar Jan 26 '25 19:01 GuillaumeBiessy

As pointed out by @muzimuzhi:

Wondering how your document worked before.

And indeed, it fails with TeXLive 2023, 2022, 2021, 2020 and 2017 (I haven't done any more tests). So, for the moment and if there is no other bug report it will remain unchanged.

jbezos avatar Jan 26 '25 20:01 jbezos

I have the same beamer compiled on the 19th of January at 1:06pm.

My best guess would be that one of the other LaTeX package automatically loaded by quarto which was introducing \labelenumi was updated or quarto itself changed its list of uploaded packages. It is possible I updated quarto on the 20th.

GuillaumeBiessy avatar Jan 27 '25 09:01 GuillaumeBiessy

I confirm that I have experienced the exact same situation after updating to the newer version. I have been using enumitem with beamer for a couple of years and the issue begun now. Adding \newcommand\labelenumi{\theenumi.} fixes the problem. I hope you could find a permanent fix to it instead of the one-line hack.

Aljumaily avatar Feb 02 '25 14:02 Aljumaily

@GuillaumeBiessy @Aljumaily Would you like to share a complete and minimal (or just not too long) example which worked before, but now raises error(s) with enumitem v3.10 (2025/01/19)?

muzimuzhi avatar Feb 02 '25 15:02 muzimuzhi

@muzimuzhi I tried to come up with a minimal example, but I wasn't able to as am using my own custom package and have been using it for the last two years. However, I have updated my TeX distribution yesterday (around 400 packages were installed) and the same issue that is opened here emerged. What is interesting is that adding

\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{\theenumii.}
\newcommand\labelenumiii{\theenumiii.}

to beamer slides fixed the issue. Moreover, non-beamer documents didn't break at all.

Aljumaily avatar Feb 02 '25 15:02 Aljumaily

I have the similar problem. The following MWE

\documentclass{beamer}
\usepackage{enumitem}
\setlist[enumerate,1]{nosep, parsep=1ex,
                    label = \textcolor{blue}{\arabic*\huge.},
                    leftmargin = 1em}

\begin{document}
\begin{frame}
\frametitle{Use enumitem enumerate in beamer}
%---------------------------------------------------------------%
    \begin{enumerate}
\item   test
\item   test
    \end{enumerate}
\end{frame}
\end{document}

works fine until new version of enumitem (Version 3.10 2025/01/19), with new it gives error Label not defined

Zarko1234 avatar Feb 03 '25 12:02 Zarko1234

@Zarko1234 Thank you for the small and reproducible example!

So the difference introduced in enumitem v3.10 (2025/01/19) is, before v3.10 \setlist[enumerate, 1]{label=\arabic*.} worked (\labelenumi was still undefined, but the infinite loop reported in #18 was not triggered any more), but with v3.10 the check for existence of \labelenumi seems too strong so that

But setting \setlist[enumerate, 1]{label=\arabic*} doesn't, which I don't know why.

muzimuzhi avatar Feb 03 '25 13:02 muzimuzhi

@GuillaumeBiessy @Aljumaily @Zarko1234 @muzimuzhi Definitely, I’ll revert this change and reopen the corresponding issue. Please, allow me a few days.

jbezos avatar Feb 04 '25 16:02 jbezos

I keep finger crossed :-). I'm in middle of reviewing and proofreading of my lectures' slides (more than 1200 of them) and now I'm forced to take a break in this process :). But don't worry (to much), I still can prepare tasks and other materials for students, where I use article document class, where enumitem works fine. I wish you a lot of luck and success at reverting. Thank you for this nice and excellent package! Regards Zarko

Zarko1234 avatar Feb 04 '25 16:02 Zarko1234