# Too deeply nested error with beamer

in this code I get a too deeply nested error

I used this command \usepackage[loadonly]{enumitem} to fix error,but all items become on the same level. Any help please?

\documentclass[compress,red]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw}
\usepackage[applemac]{inputenc}%les accents pour mac
\usepackage{caption}
\captionsetup{font=small}
\captionsetup{labelformat=empty}
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{animate}
\usepackage{movie 15}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[all,knot]{xy}
\xyoption{arc}
\usepackage{url}
\usepackage{array,ragged2e}
%\usepackage{multimedia}
%\usepackage{hyperref}
\usepackage{setspace}
\usepackage{multirow}

\begin{document}
\section{section1 }
\frame[shrink]{\frametitle{Titre de la fenetre}
\begin{itemize}
\item Optimisation problem
\begin{itemize}
\setbeamercolor*{item}{fg=green}
\item \tiny chamfer distance
\item Algorithme d’optimisation
\textit{\begin{enumerate}
\item step1
\item step2
\item step3
\begin{itemize}
\item step3.1
\item step3.2
\item step3.3
\item step3.4
\itemstep3.5
\end{itemize}
\item step4
\end{enumerate} }
\end{itemize}
\end{itemize}
}
\end{document}

• You shouldn't use enumitem with beamer, it's not really compatible with it. And you should almost never need the loadonly option of enumitem unless you really know what you are doing. There's also a typo in your code: \usepackage{movie 15} (typical Mac auto correct problem). Is that in the code you tried to run? – Alan Munn Nov 17 '13 at 3:38
• @AlanMunn, thanks, surely, there is a solution. I will find it. – BetterEnglish Nov 17 '13 at 3:41
• Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. – samcarter_is_at_topanswers.xyz Nov 1 '16 at 22:15

The error message too deeply nested error is removed if the description environment is used. It seems that (and I quote) "There are three predefined environments for creating lists, namely enumerate, itemize, and description. The first two can be nested to depth three". This comment pushes me to use 'description' and it does work. Please check page 111-114 of beamer user manual.

Code

\documentclass[compress,red]{beamer}
\usepackage{etex}
\mode<presentation>
\usetheme{Warsaw}
\usepackage[applemac]{inputenc}%les accents pour mac
\usepackage{caption}
\captionsetup{font=small}
\captionsetup{labelformat=empty}
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{animate}
\usepackage{movie 15}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
% \usepackage[all,knot]{xy}
% \xyoption{arc}
\usepackage{url}
\usepackage{array,ragged2e}
%\usepackage{multimedia}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{multirow}

\begin{document}
\section{section1}
\begin{frame}[shrink=0]
\frametitle{Titre de la fenetre}
\begin{enumerate}
\item Optimisation problem
\begin{itemize}
\setbeamercolor*{item}{fg=green}
\item{\tiny chamfer distance}
\item Algorithme d'optimisation
\textit{\begin{itemize}
\item step1
\item step2
\item step3
\begin{description}[abc]  % for indentation of length of abc
\item[$\bullet$] step3.1
\item[$\bullet$] step3.2
\item[$\bullet$] step3.3
\item[$\bullet$] step3.4
\item[$\bullet$] step3.5
\end{description}
\item step4
\end{itemize}}
\end{itemize}
\end{enumerate}
\end{frame}
\end{document}

• Hello, soory it does not work for me. I have an overflow arithmetic error. – BetterEnglish Nov 18 '13 at 1:50
• Hi, just to make sure, I recompiled your OP codes without any overflow arithmetic errors on my end (Window, TeXworks). There is an inputenc package for XeLaTeX. If you use PdfLaTeX, please comment it out. Just for your information. – Jesse Nov 18 '13 at 7:12
• Thanks, I fixed the problem. I make an error when I get an overflow arithmetic. I finish my presentation and november 21 I will show it. Good luck for me! – BetterEnglish Nov 18 '13 at 17:43