# List of equations, tocloft package, giving me error [closed]

I know this question was answered earlier at: http://www.latex-community.org/forum/viewtopic.php?f=5&t=428, but I am having problem using the tocloft library with my schools thesis template. When I try attempt to create a list of equations as explained in the link, I get an error stating that lofdepth in tocloft is being redefined in my thesis template files. I have checked my class file, but it is not defined there.

I am wondering if anyone can help me to implement the list of equations in my thesis class. I am happy to label my equations with the \myequations command to have them show up in the list of equations. I have attached the class file here.

% U_Maine_thesis.cls
%   $MercurialId: file|basename},v 1dba7f9321db 2012/09/12 17:38:55 hummels$
%
% Document package to something close to the  UMaine Thesis Format.
%
%  Usage:
%   \usepackage[relax,crpage,includefooter]{U_Maine_Thesis}
%
% With no options, the document is typeset with a format that's
% "pretty close" to the UMaine Thesis requirements.  You'll have to
% customize the results, depending on the reviewer that you end up
% with in format approval.
%
% Specifying "relax" to break a few of the thesis format rules that have
% been enforced recently.  For example, "relax" results in a single-spaced
% less paper, but may be rejected depending on who reviews your thesis.
%
% Specifying "crpage" indicates that a copyright page should be inserted into the document
%
% Specifying "includefooter" inserts your name and degree at the bottom of
% every page.  Thesis format won't allow it, but I insist on it for anything that
% I distribute (online or print) to anyone off campus.  If it's not there, the
% ONLY author information is on the title page(s), which tend to be quickly lost
% as the document is reproduce (or individual chapters of interest are printed).
%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{U_Maine_Thesis}[2010/05/05 UMaine Thesis Format]

% Package Options
\DeclareOption{relax}{
\AtBeginDocument{ \renewcommand{\relaxedspacing}{\singlespacing}}
}
\DeclareOption{crpage}{%
\AtBeginDocument{
\thispagestyle{plain} \clearpage
~\vspace{\stretch{1}}
\begin{center}
\end{center}
\vspace{\stretch{1}}
\clearpage
}
}
}
\DeclareOption{includefooter}{%
\AtBeginDocument {%
\fancypagestyle{plain}{%            (Used for 1st page of chapters)
\fancyhf{}%
\lfoot{\small\raisebox{-1.3\baselineskip}{\includegraphics[height=2\baselineskip]{umaine_ece_logo}}}
\cfoot{\thepage}
\rfoot{\small{\emph{\@degree\\ \@author, \@date}}}
\renewcommand{\footrulewidth}{0.4pt}%
}
\renewcommand{\setdefaultpagestyle}{\pagestyle{fancy}}  % (Document Default)
\setdefaultpagestyle
%\lfoot{\small{\emph{University of Maine\\ \@major}}}
\lfoot{\small\raisebox{-1.3\baselineskip}{\includegraphics[height=2\baselineskip]{umaine_ece_logo}}}
\cfoot{\thepage}
\rfoot{\small{\emph{\@degree\\ \@author, \@date}}}
\renewcommand{\footrulewidth}{0.4pt}%
}%
}

\DeclareOption{10pt}{\OptionNotUsed}
\DeclareOption{11pt}{\OptionNotUsed}
\DeclareOption{a4paper}{\OptionNotUsed}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}    % Other options passed on to report class

\ProcessOptions\relax

\RequirePackage{times}
\RequirePackage{graphicx}
\RequirePackage{ifthen}
\RequirePackage{calc}
\RequirePackage{fancyhdr}%
\RequirePackage{setspace}
\RequirePackage[indentafter,newlinetospace]{titlesec}
\RequirePackage[dotinlabels]{titletoc}
\RequirePackage{ccaption}

%%
%% Thesis Margins
%%
\setlength{\textheight}{9in}        % height of text body
\setlength{\topmargin}{-0.5in}      % move the body to the top
\setlength{\textwidth}{5.8in}   % left margin = 1.5in, right margin = 1.2in
\setlength{\parindent}{0.5in}   % set paragraph indentation to 1/2 in

%%
%% Line Spacing...
%%  Default to everything doublespaced.  If the "relax" option is specified,
%%   \relaxedspacing will be redefined as \singlespace.  \relaxedspacing is used
%%   in the TOC, LOF, LOT.
%%
% At least once, the thesis format reviewers didn't like LaTeX's definition of
% doublespacing (they thought it was too tight).  To increase the spacing,
% redefine it using the \setstretch command ( By default, \doublespacing
% is equivalent to using \setstretch{1.655} )  If needed, try uncommenting
% the following line:
% \renewcommand{\doublespacing}{\setstretch{2}}  % global redefinition of \doublspacing
%%
\newcommand{\relaxedspacing}{\doublespacing}
\doublespacing

%%
%% Fight with latex decisions regarding widows, orphans, hyphens, etc.
%%
\raggedbottom           % Prevents strange white-space adjustment, and allows
% breaking the page a little early to avoid widows/orphans
\clubpenalty =10000             % cost of an orphaned line
\widowpenalty =10000            % cost of a  widowed line
\brokenpenalty=10000            % cost of a hyphenated word at page break
\doublehyphendemerits=40000     % Two consecutive hyphenated lines are
% strongly discouraged.
\finalhyphendemerits =10000     % The next-to-last line of a paragraph should
% not be hyphenated, but can be if necessary.
\righthyphenmin=3           % >3 characters to the right of any hyphen
\lefthyphenmin=4            % >4 characters to the left of any hyphen
\renewcommand{\topfraction}{0.5} % No more than 50% of page dedicated to floating figures/tables
\setlength{\emergencystretch}{2em} % IF needed, add extra space to avoid going into margins!
%%
%% Store thesis information in a set of variable that will
%% be used in the \maketitle and abstract environment
%% (\author and \date are also used)
%%
\newcommand \background[1]{\gdef \@background{#1}}
\newcommand \degree[1]{\gdef \@degree{#1}}
\newcommand \major[1]{\gdef \@major{#1}}
\newcommand \committee[1]{\gdef \@committee{#1}}
\newcommand{\setdefaultpagestyle}{\pagestyle{plain}}

%%
%% The thesis information must be part of the preamble so that the
%% information is available before the pdf "document info" is filled out.
%%
\@onlypreamble\background
\@onlypreamble\degree
\@onlypreamble\major
\@onlypreamble\author
\@onlypreamble\date
\@onlypreamble\committee

%%
%% Defulault \copyrightnotice... do nothing (redefined by crpage option)
%% Defulat \@printtheabstract... Typeset a message asking for an abstract
%%
\newcommand{\@printtheabstract}{\fbox{\emph{No Abstract available\dots Use the abstract
environment \textbf{before} the $\backslash$titlepage}}}

%%
%% redefine \maketitle
%%   Print the correct format title page, library rights page, acceptance page and abstract.
%%
\renewcommand{\maketitle}{
\thispagestyle{empty}
\begin{titlepage}%
\begin{center}%
%\vspace*{\stretch{1}}
%    {\LARGE \scshape \@title \par}%
%    {\large\bfseries \@title \par}%
{\normalsize\bfseries \@title \par}%
\vspace*{\stretch{2}}
By \\
\@author \\
\@background \\
\vspace*{\stretch{2}}
A DISSERTATION \\
Submitted in Partial Fulfillment of the\\
Requirements for the Degree of \\
\@degree\\
(in~\@major)\\
\vspace*{\stretch{2}}
The University of Maine\\
\@date
\vspace*{\stretch{2}}
\end{center}\par
\vspace*{\stretch{0.5}}
\begin{singlespace}
\end{singlespace}
\begin{list}
{\leftmargin 0.5in\topsep 0pt\partopsep 0pt}
\item
\@committee
\end{list}
\vspace*{\stretch{2}}

\end{titlepage}%
\setcounter{footnote}{0}%
\setcounter{page}{2}
\let\thanks\relax\let\maketitle\relax
\newcounter{savepage} % Don't count pages in the lib rights or abstract...
% save the page counter here for restoration later
\setcounter{savepage}{\value{page}}

\chapter*{LIBRARY RIGHTS STATEMENT}  \thispagestyle{empty}
In presenting this dissertation in partial fulfillment of the
requirements for an advanced degree at The University of Maine,
I agree that the Library shall make it freely available for
inspection. I further agree that permission for fair use" copying of
this dissertation for scholarly purposes may be granted by the Librarian. It
is understood that any copying or publication of this dissertation for
financial gain shall not be allowed without my written permission. \\[.5in]
\begin{singlespace} \noindent
\begin{tabbing}
Signature: \= \underline{\hspace{3in}}\ \ Date: \underline{\hspace{1in}}\\
\> \@author \\
\end{tabbing}
\end{singlespace}
\pagestyle{empty}
\newpage       % Abstract page
\vspace{0.5in}
\begin{center}
%    {\large\bfseries\@title \par}
{\normalsize\bfseries\@title \par}

\begin{singlespace}
\vspace{0.35in} By \@author

\vspace{.35in}
An Abstract of the Dissertation Presented \\
in Partial Fulfillment of the Requirements for the \\
Degree of \@degree\\
(in~\@major)\\
\@date
\end{singlespace}
\end{center} \vspace{0.2in}
\noindent\@printtheabstract
\clearpage
\setdefaultpagestyle
\setcounter{page}{\value{savepage}}
\chapter*{ACCEPTANCE STATEMENT}
On behalf of the Graduate Committee for \@author, I affirm that this
manuscript is the final and accepted dissertation.
Signatures of all committee members are on file with the Graduate School
at the University of Maine, 42 Stodder Hall, Orono, Maine.\\[.2in]
\begin{singlespace} \noindent
\begin{tabbing}
Signature: \= \underline{\hspace{3in}}\ \ Date: \underline{\hspace{1in}}\\
\end{tabbing}
\end{singlespace}
}

%%
%% redefine the Abstract environment
%%  The abstract is saved in a box, so that it can be placed when needed (in \maketitle).
\newsavebox{\myabstracttext}
\renewenvironment{abstract}{%
\ifx\maketitle\relax
\ClassWarning{U_Maine_Thesis}{Abstract should precede \protect\maketitle; reported}%
\fi
\global\setbox\myabstracttext=\vtop  \bgroup
\setlength{\parindent}{0.5in}
}{
\egroup
\xdef\@printtheabstract{\unvbox\myabstracttext}
}

%%
%% redefine the format for chapter, section, subsection
%%   (See the titlesec documentation)
%%   UMaine insists no font-size changes for headings
\titleformat{\chapter}[display]{\normalsize\bfseries\filcenter}{Chapter~\thechapter}{0in}{}
\titlespacing{\chapter}{0pt}{-.4in}{.25in}

\titleformat{\section}[hang]{\normalsize\bfseries}{\thesection\hspace{0.1in}}{0in}{}
\titlespacing{\section}{0pt}{.23in}{.13in}

\titleformat{\subsection}[hang]{\normalsize\bfseries}{\thesubsection\hspace{0.1in}}{0in}{}
\titlespacing{\subsection}{0pt}{.2in}{.09in}

%%
%%   UMAINE:    "Chapter" entries should be introduced by the word "Chapter" on a separate line
%       Chapter Toc entries should have dots
%%              List of tables entries are labeled "Table x.y"
%%              List of figures entries are labeled "Figure x.y"
%%
\setcounter{secnumdepth}{10}            % Include ALL subsections in the TOC (until \appendix)
\setcounter{tocdepth}{10}
\providecommand*{\toclevel@appendix}{0} % Make pdflatex aware of appendix entries
\renewcommand\@dotsep{0.5}              % Used by all the toc sections not redefined below.
\newlength{\contentslength}

\contentsmargin[3em]{0in}   % 3em "correction" added to toc text right margin
% to ensure 5 dots in all dotted contents lines.
\titlecontents{chapter}[0in]
{ \ifthenelse{\equal{\thecontentslabel}{1}}{
\vspace{1.3\baselineskip}Chapter\\ \normalsize  % Chapter 1 Format
}{
\normalsize\vspace{.2\baselineskip}         % Format for other chapters
}
}
{\contentspush{\thecontentslabel.~}}  % Commands before the label entry
{}                                  % Commands before "label" for starred versions
{\titlerule*[.3em]{.}\thecontentspage} % Filler and page #
{}                  % Commands after the entry
\titlecontents{section}[.3in]{}
{\contentspush{\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
\titlecontents{subsection}[.6in]{}
{\contentspush{\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
\titlecontents{subsubsection}[.9in]{}
{\contentspush{\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
\titlecontents{paragraph}[1.2in]{}
{\contentspush{\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
\titlecontents{subparagraph}[1.5in]{}
{\contentspush{\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}

\titlecontents{table}[0in]{}
{\contentspush{Table~\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}

\titlecontents{figure}[0in]{}
{\contentspush{Figure~\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}

%%
%% Get the UMAINE Thesis section names right
%%
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand{\listfigurename}{LIST OF FIGURES}
%\renewcommand{\listequationname}{LIST OF EQUATIONS}
\renewcommand{\bibname}{REFERENCES}

%%
%% redefine the bibliography, lof, lot so that an entry is placed in the TOC
%% I also like having a pdf bookmark point to the toc..
%%
%% Also, the bibliography is single-spaced, with double space between entries.
%%
\let\Oldthebibliography\thebibliography     % Called on \begin{thebibliography}
\renewcommand{\thebibliography}[1]{
\cleardoublepage
\phantomsection
\begin{singlespace}
\Oldthebibliography{#1}
\addtolength{\itemsep}{.7\baselineskip}   % Increase space between bib entries.
}
\let\Oldendthebibliography\endthebibliography   % Called on \end{thebibliography}
\renewcommand{\endthebibliography}{
\Oldendthebibliography
\end{singlespace}
}

\let\Oldlistoffigures\listoffigures
\renewcommand{\listoffigures}{
\cleardoublepage
\phantomsection
{\relaxedspacing \Oldlistoffigures }
}

\let\Oldlistoftables\listoftables
\renewcommand{\listoftables}{
\cleardoublepage
\phantomsection
{\relaxedspacing \Oldlistoftables }
}

% Al added this for equations
%\let\Oldlistoftables\listofmyequations
%\newcommand{\listequationsname}{LIST OF EQUATIONS}
%\newlistof{myequations}{equ}{\listequationsname}
%\newcommand{\myequations}[1]{%

%\newcommand{\listofmyequations}{
%  \cleardoublepage
%  \phantomsection
%  \newlistof{myequations}{equ}{\listequationname}
%  \newcommand{\myequations}[1]{%
%  {\relaxedspacing \Oldlistoftables }
%}
%

%\let\Oldlistoftables\listoftableseq
%\renewcommand{\listoftableseq}{
%  \cleardoublepage
%  \phantomsection
%  {\relaxedspacing \Oldlistoftableseq }
%}

%\let\Oldlistofequations\listofequations
%\renewcommand{\listofequations}{
%  \cleardoublepage
%  \phantomsection
%  {\relaxedspacing \Oldlistofequations }
%}

\let\Oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{
\cleardoublepage
\phantomsection
\pdfbookmark[0]{\contentsname}{my_toc}
{\relaxedspacing \Oldtableofcontents}
\setcounter{tocdepth}{10}     % Needed here for pdflatex, since the toc depth
% is changed in the toc for appendices
}

%%
%% Appendix: redefine "chapter" labels and toc entries when "\appendix" is used
%%  Also, anything below a \section is NOT included in the TOC (by setting tocdepth to 1)
%%    Kale Schrader...  Aug 2010: No Sections should be labeled in TOC entries for
%%      Appendixes: Changing tocdepth to 0.  -DMH
%%
\renewcommand{\appendixname}{APPENDIX}
\let\oldAppendix\appendix
\renewcommand{\appendix}{
\oldAppendix
\cleardoublepage
\phantomsection
\pdfbookmark[0]{APPENDICES}{my_apps}
\titleformat{\chapter}[display]{\normalsize\bfseries\filcenter}{\appendixname~\thechapter}{0in}{}
\titlespacing{\chapter}{0pt}{-.4in}{.25in}
\titlecontents{chapter}[0in]{\normalsize\vspace{.2\baselineskip}}
{\contentspush{APPENDIX~\thecontentslabel.~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
}

%%
%% In case there's only one appendix, the TOC and chapter headings are slightly different.
%% In this case, the TOC and chapter heading should be "Appendix", instead of "Appendix A".
%% The trick is that we still want sections in the appendix labeled A.1, A.2, etc... even
%% though we dont label the section "Appendix A".  The \oneappendix command serves to redefine
%% the format of the chapter headings and toc entries.
%%
\newcommand{\oneappendix}{
\titleformat{\chapter}[display]{\normalsize\bfseries\filcenter}{\appendixname}{0in}{}
\titlecontents{chapter}[0in]{\normalsize\vspace{.2\baselineskip}}
{\contentspush{APPENDIX~}}{}
{\titlerule*[.3em]{.}\thecontentspage}{}
}

%%
%% Change the figure & table environments to label things as "Figure 2.3. <caption text>"
%% instead of the default "Figure 2.3: <caption text>"
%%
%% So far, the grad school has not insisted on double-spacing figure and table captions.
%% The required \captionstyle command is shown below (commented), in case this changes.
%% (They DO insist on double-spaced entries in the list of figures/tables.)
%%
%%   (See the ccaption package documentation)
\captiondelim{. }
%\captionstyle{\doublespacing}

%%
%% After the user defines title, author etc, fill out the "pdf info" that will display
%% when the "document properties" are viewed in the pdf reader.
%%
\AtBeginDocument{
\hypersetup{
pdftitle={\@title},
pdfsubject={U. Maine \@degree\ Dissertation, \@major},
pdfauthor={\@author}
}
}{}
}


## closed as unclear what you're asking by Joseph Wright♦Aug 14 '13 at 19:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.sx! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Peter Jansson Apr 26 '13 at 7:16
• Please edit your question and add a minimal complete document (like the one in my previous comment) allowing us to reproduce the problem. – Gonzalo Medina Apr 26 '13 at 13:14