尝试生成论文目录

尝试生成论文目录

我使用的类文件在目录部分中有此代码。问题在于它不符合大学论文要求目录内各部分必须缩进。例如,我希望目录看起来更像这个例子:

论文目录格式

除了这个缩进问题,其他一切都很好。我想知道我是否可以得到一些帮助来更改此代码以解决这个问题。

这是我的代码,我也已将其粘贴在此链接中

http://www.texpaste.com/n/nv5i42qf

% TABLEOFCONTENTS
%  In thesis class, \tableofcontents, \listoffigures, etc. are always
%  set in single-column style.  @restonecol


\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \fi\chapter*{\bf Table of Contents\@mkboth{}{}\addcontentsline{toc}{chapter}{Table of Contents}}
 \@starttoc{toc}\if@restonecol\twocolumn\fi} %added \bf to print Table of Contents in bold on pg 2006nm


\def\l@part#1#2{\addpenalty{-\@highpenalty}
   \addvspace{2.25em plus 1pt}  % space above part line
   \begingroup
   \@tempdima 3em         % width of box holding part number, used by
     \parindent \z@ \rightskip \@pnumwidth             %% \numberline
     \parfillskip -\@pnumwidth
     {%\large \bfseries          % set line in \large boldface 2006nm
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
     \nobreak             % Never break after part entry
   \endgroup}


\def\l@chapter#1#2{\pagebreak[3]
   \vskip 1.0em plus 1pt  % space above chapter line
   \@tempdima 1.5em       % width of box holding chapter number
   \begingroup
     \parindent \z@ \rightskip \@pnumwidth
     \parfillskip -\@pnumwidth
     %\bfseries                  % Boldface removed. 2006nm
     \leavevmode          % TeX command to enter horizontal mode.
     #1\hfil \hbox to\@pnumwidth{\hss #2}\par
   \endgroup}

\def\l@chapter{\@dottedtocline{0}{1.5em}{2.3em}}  %added this line 2006nm
\def\l@section{\@dottedtocline{1}{1.5em}{2.3em}} %changed 1 to 0 2006nm
\def\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\def\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}
\def\l@paragraph{\@dottedtocline{4}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{5}{12em}{6em}}

% LIST OF FIGURES AND ILLUSTRATIONS
%
\def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \fi\chapter*{\bf{List of Figures and Illustrations}\markboth
   {}{}\addcontentsline{toc}{chapter}{List of Figures}}%(NM 2005 added List of Figures to TOC)
   \@starttoc{lof}\if@restonecol\twocolumn
  \fi}

\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}

% LIST OF TABLES
%
\def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  \fi\chapter*{\bf{List of Tables}\markboth
   {}{}\addcontentsline{toc}{chapter}{List of Tables}}%(NM 2005 added List of Tables to TOC)
   \@starttoc{lot}\if@restonecol\twocolumn
  \fi}

\let\l@table\l@figure

% List of Symbols, Abbreviations and Nomenclature
%
\def\listofsymbols{\input{symbols} \clearpage}
\def\addsymbol #1: #2{$#1$ \> \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   \parbox{5in}{#2}\\}
\def\newnot#1{\label{#1}}



%    ****************************************
%    *             BIBLIOGRAPHY             *
%    ****************************************
%
% The thebibliography environment executes the following commands:
%
%  \def\newblock{\hskip .11em plus .33em minus -.07em} --
%      Defines the `closed' format, where the blocks (major units of
%      information) of an entry run together.
%
%  \sloppy  -- Used because it's rather hard to do line breaks in
%      bibliographies,
%
%  \sfcode`\.=1000\relax --
%      Causes a `.' (period) not toproduce an end-of-sentence space.

\def\thebibliography#1{\altchapter{Bibliography}\list
  {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \usecounter{enumi}}
    \def\newblock{\hskip .11em plus .33em minus -.07em}
    \sloppy
    \sfcode`\.=1000\relax}

\let\endthebibliography=\endlist

% \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]
                                % command.
% \def\@cite#1{[#1]}            % Produces the output of the \cite command.

答案1

控制目录条目中的水平间距:

 \makeatletter
 \renewcommand*\l@section{\@dottedtocline{1}{0em}{1.8em}}
 \renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.0em}}
 \renewcommand*\l@subsubsection{\@dottedtocline{3}{4.3em}{3.0em}}
 \makeatother

第一个参数(1、2 和 3)表示节 (1)、小节 (2) 或小小节 (3)。第二个参数表示从左侧缩进,第三个参数表示数字和文本之间的分隔。

如果你想直接在类文件中修改它们,则无需使用以下命令包装命令\makeatletter ... \makeatother

相关内容