方程式列表,tocloft 包,给我错误

方程式列表,tocloft 包,给我错误

我知道这个问题之前已经在以下网址得到回答:http://www.latex-community.org/forum/viewtopic.php?f=5&t=428,但我在使用该库与我的学校论文模板时遇到了问题tocloft。当我尝试创建链接中所述的方程列表时,我收到一条错误消息,指出lofdepth正在tocloft我的论文模板文件中重新定义。我检查了我的类文件,但那里没有定义它。

我想知道是否有人可以帮助我实现论文课程中的方程列表。我很乐意用命令标记我的方程,\myequations让它们显示在方程列表中。我已在此处附加课程文件。

% 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
% table of contents/list of figures/list of tables.  It looks better, wastes
% 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{ 
    \renewcommand{\copyrightnotice}{
      \thispagestyle{plain} \clearpage
      ~\vspace{\stretch{1}}
      \begin{center}
        \copyright~\@date~\@author
      \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{\headrulewidth}{0pt}%  
    }
    \renewcommand{\setdefaultpagestyle}{\pagestyle{fancy}}  % (Document Default)
    \setdefaultpagestyle
    \lhead{}
    \chead{}
    \rhead{}
    %\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}%
    \renewcommand{\headrulewidth}{0pt}%
  }%
}

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

\ProcessOptions\relax

\LoadClass[12pt,letterpaper]{report}

\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{\headheight}{16pt}
\setlength{\headsep}{0.5in-\headheight}
\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 \advisor[1]{\gdef \@advisor{#1}}
\newcommand \advisortitle[1]{\gdef \@advisortitle{#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\advisor
\@onlypreamble\advisortitle
\@onlypreamble\author
\@onlypreamble\date
\@onlypreamble\committee

%%
%% Defulault \copyrightnotice... do nothing (redefined by crpage option)
%% Defulat \@printtheabstract... Typeset a message asking for an abstract
%%
\newcommand \copyrightnotice{ }
\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 Graduate School\\
    The University of Maine\\
    \@date
    \vspace*{\stretch{2}}
  \end{center}\par
  \vspace*{\stretch{0.5}}
\begin{singlespace}
  \noindent Advisory Committee:
  \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
  \copyrightnotice
  \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{\baselineskip} Dissertation Advisor: \@advisor

      \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]
    Submitted for graduation in \@date.\\[.5in]
    \begin{singlespace} \noindent
    \begin{tabbing}
      Signature: \= \underline{\hspace{3in}}\ \ Date: \underline{\hspace{1in}}\\
                 \> \@advisor \\
                 \> \@advisortitle \\
    \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}

%%
%% Define the table of contents entry formats (see titletoc documentation)
%%   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{\contentsname}{TABLE OF CONTENTS}
\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
  \addcontentsline{toc}{chapter}{\bibname}
  \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
  \addcontentsline{toc}{chapter}{\listfigurename}
  {\relaxedspacing \Oldlistoffigures }
}

\let\Oldlistoftables\listoftables
\renewcommand{\listoftables}{
  \cleardoublepage
  \phantomsection
  \addcontentsline{toc}{chapter}{\listtablename}
  {\relaxedspacing \Oldlistoftables }
}

% Al added this for equations
%\let\Oldlistoftables\listofmyequations
%\newcommand{\listequationsname}{LIST OF EQUATIONS}
%\newlistof{myequations}{equ}{\listequationsname}
%\newcommand{\myequations}[1]{%
%\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}

%\newcommand{\listofmyequations}{
%  \cleardoublepage
%  \phantomsection
%  \newlistof{myequations}{equ}{\listequationname}
%  \newcommand{\myequations}[1]{%
%  \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
%  %\addcontentsline{toc}{chapter}{\listequationname}
%  {\relaxedspacing \Oldlistoftables }
%}
%

%\let\Oldlistoftables\listoftableseq
%\renewcommand{\listoftableseq}{
%  \cleardoublepage
%  \phantomsection
%  \addcontentsline{toc}{chapter}{\listequationname}
%  {\relaxedspacing \Oldlistoftableseq }
%}

%\let\Oldlistofequations\listofequations
%\renewcommand{\listofequations}{
%  \cleardoublepage
%  \phantomsection
%  \addcontentsline{toc}{chapter}{\listequationname}
%  {\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}
  \addtocontents{toc}{\protect \setcounter{tocdepth}{0} \par}
  \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{ 
  \@ifpackageloaded{hyperref}{
    \hypersetup{
      pdftitle={\@title},
      pdfsubject={U. Maine \@degree\ Dissertation, \@major},
      pdfauthor={\@author}
    }
  }{}
}

相关内容