3

In the MWE below, if I comment out the use of enumitem everything works fine, but with it included it breaks. Is there a way to have this working?

\documentclass{beamer}

\usepackage{enumitem}

\begin{document}

\begin{frame}{title}

\begin{enumerate}[<+->]
    \item How
    \item are
    \item you?
\end{enumerate}

\end{frame}

\end{document}

If I use the following code I get the error: Package enumitem Error: <+-> undefined.

\documentclass{article}\usepackage{beamerarticle}

\mode<article>{\usepackage{enumitem}}

\begin{document}

\begin{frame}{title}

\begin{enumerate}[<+->]
    \item How
    \item are
    \item you?
\end{enumerate}

\end{frame}

\end{document}
10
  • 4
    You shouldn't load enumitem in beamer. Beamer already has its enumeration facilities, which are incompatible with enumitem's. Sep 7, 2018 at 15:32
  • 1
    Why do you want to use enumitem? Sep 7, 2018 at 15:34
  • @samcarter I have one source file which can be used to create a beamer presentation, handouts and an article mode. I'm using the enumitem in the article mode.
    – Geoff
    Sep 7, 2018 at 15:41
  • @Geoff And for what do you need it in article mode? (Am just trying to find out if there isn't another way without the enumitem package) Sep 7, 2018 at 15:46
  • @samcarter I can't answer that exactly, I'm probably using it for many purposes. One that comes to mind though is to resume.
    – Geoff
    Sep 7, 2018 at 15:49

1 Answer 1

5

If you want to load the enumitem package to use it in article mode, you can restrict the loading to this mode.

Then one just has to hide [<+->] from the enumitem package, which can be done with \beamerdefaultoverlayspecification{<+->} either globally or locally.

%\documentclass{beamer}

\documentclass{article}
\usepackage{beamerarticle}

\mode<article>{
\usepackage{enumitem}
}

\begin{document}

\begin{frame}{title}

{
\beamerdefaultoverlayspecification{<+->}% <- can also be used in the preamble if it should apply to all itemization/enumerate
\begin{enumerate}
    \item How
    \item are
    \item you?
\end{enumerate}
}

\end{frame}

\end{document}
2

You must log in to answer this question.

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