beamer 嵌套错误太深

beamer 嵌套错误太深

在这段代码中我得到一个too deeply nested error

我使用此命令\usepackage[loadonly]{enumitem} 修复错误,但所有项目都处于同一级别。有什么帮助吗?

\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}

答案1

too deeply nested error如果使用该环境,则错误消息将被删除description。似乎(我引用)"There are three predefined environments for creating lists, namely enumerate, itemize, and description. The first two can be nested to depth three"。此评论促使我使用“描述”,并且它确实有效。请查看 Beamer 用户手册第 111-114 页。

在此处输入图片描述

代码

\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}

相关内容