对于以下 tex,我收到“Enviroment theindex undefined”错误。我没有在 .tex 的任何部分使用索引。但是当我使用“\newenvironment{theindex}”或“\renewenvironment{theindex}”时,它仍然说 theindex 已经定义。你有什么建议?
\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,enumerate,algorithm,ifthen,algorithmic,epsfig}
\usepackage{epstopdf}
\usetheme{Berkeley}
\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
\setbeamertemplate{sidebar right}{}
\setbeamertemplate{footline}{%
\hfill\usebeamertemplate***{navigation symbols}
\hspace{1cm}\insertframenumber{}/\inserttotalframenumber}
\usepackage[nottoc]{tocbibind}
\begin{document}
\begin{frame}
\end{frame}
\end{document}
答案1
tocbibind
您的代码无法编译,因为您正在加载与目录/索引有关的包,而这自然不是为幻灯片集定义的。因此,在您不需要有问题的包后,一切都会好起来。
顺便说一句,你的还不够最小工作示例。
\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
%\usepackage{graphicx}
\usepackage{amsmath,amssymb,enumerate,algorithm,ifthen,algorithmic} %,epsfig
\usepackage{epstopdf}
\usetheme{Berkeley}
\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
\setbeamertemplate{sidebar right}{}
\setbeamertemplate{footline}{%
\hfill\usebeamertemplate***{navigation symbols} \hspace{1cm}\insertframenumber{}/\inserttotalframenumber}
\usepackage{tikz}
\usepackage{tkz-berge}
\usepackage{tkz-graph}
\usetikzlibrary{arrows,calc,positioning}
\usepackage{cases}
\usepackage{todonotes}
\usepackage{float}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
%\usepackage[nottoc]{tocbibind}
\begin{document}
\begin{frame}
\begin{tikzpicture}[scale=1]
\tikzset{vertex/.style = {shape=circle,draw,scale=0.3,minimum size=1em}}\tikzset{edge/.style = {-,> = latex'}}
\node [black] at (1,0) {$m_2$}; \node [black,rotate=90] at (0,1) {$m_1$};
\node [black,rotate=90] at (0,-1) {$m_3$};\node [black] at (-1,0) {$m_4$};
\draw [black](-0.15,0) rectangle (.15,2);%m_1
\draw [black] (-0.15,0) rectangle (.15,-2);%m_3
\draw [black] (0.15,.15) rectangle (2,-.15);\draw [black] (-0.15,.15) rectangle (-2,-.15);
\node[vertex] (a1) at (2,0.25) {};\node[vertex] (a2) at (2,-0.25) {};
\node[vertex] (b1) at (-2,0.25) {};\node[vertex] (c1) at (0.25,-2) {};
\node[vertex] (c2) at (-0.25,-2) {};\node[vertex] (d2) at (0.25,2) {};
\node[vertex] (d1) at (-0.75,2) {};\node[vertex] (d3) at (-0.25,2) {};
\node [blue] at (.25,2.5) {$j_3$};\node [black!30!green] at (-0.75,2.5) {$j_1$};
\node [red] at (-0.25,2.5) {$j_2$};\node [purple] at (0.25,-2.5) {$j_4$};
\draw[edge][thick][black!30!green] (d1) [->][out=-90, in=0] to (b1);
\draw[edge][thick][blue] (d2) [->][out=-90, in=180] to (a1);
\draw[edge][thick][red] (d3) [->] to (c2);
\draw[edge][thick][purple](c1) [->][out=90, in=180] to (a2);
\end{tikzpicture}
\end{frame}
\end{document}