# getting error in beamer "Enviroment theindex undefined"

For the following tex, I get the error that "Enviroment theindex undefined". I did not use index in any part of my .tex. But still when I use "\newenvironment{theindex}" or "\renewenvironment{theindex}" it says theindex has been already defined. What is your suggestion?

\documentclass{beamer}
\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}{%

\begin{document}


\begin{frame}

\end{frame}

\end{document}

• Off-topic, but you don't need graphicx with beamer, as beamer already provides this functionality. Aug 6 '17 at 10:50

Your code won't compile because you're loading a package that's doing something with a table of contents/index, which naturally isn't defined for a set of slides. So all is well after one comments out the offending package, which you don't need.

As an aside, yours is not quite a minimal working example.

\documentclass{beamer}
\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}{%

\usepackage{tikz}\usepackage{tkz-berge}\usepackage{tkz-graph}
\usetikzlibrary{arrows}
\usetikzlibrary{calc,positioning}
\usepackage{cases}\usepackage{tikz}\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}

• Thank you so much. It is working now. I edited my question.
– Lena
Aug 6 '17 at 2:35
• note that my code compiles fine.
– JPi
Aug 6 '17 at 10:53