论文格式帮助、目录

论文格式帮助、目录

我需要紧急帮助,对目录的论文格式进行改进,我就是搞不清楚,而且我有一个提交截止日期来获得博士学位。

我已经手动创建了目录(我必须这样做),并且需要在其中进行以下更改:

  1. 图表列表距标题三倍行距
  2. 除多行标题外,每个条目之间都有双倍行距。
  3. 如果标题有两行或更多行,则缩进第二行。

我试过所有办法,也找遍了所有地方,但就是搞不定。如果能尽快得到帮助,我将不胜感激。

我附上了 TeX 代码。我在 Overleaf 上工作。

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{geometry}
\usepackage{setspace}
\usepackage{endnotes}
\usepackage{sectsty}
\usepackage{indentfirst}
\usepackage{graphicx} % Allows including images
\usepackage{footmisc}
\usepackage{etoolbox}
\setlength{\footnotesep}{\baselineskip} %use 1.67\baselineskip for a double space
\usepackage[utf8]{inputenc}
\pagenumbering{roman}

\setcounter{MaxMatrixCols}{10}


\baselineskip = 21pt
\renewcommand
\baselinestretch{1.5}
\newtheorem{defn}{Definition}
\geometry{left=1in,right=1in,top=1in,bottom=1in}
\doublespacing
\makeatletter
\def\@biblabel#1{\hspace*{-\labelsep}}
\makeatother

\renewcommand{\contentsname}
    {\centering \normalsize CONTENTS}


\newcommand{\addsection}[3]{\addtocontents{toc}{\protect\contentsline{section}{\protect\numberline{#1}#2}{#3}}}
\newcommand{\addsubsection}[3]{\addtocontents{toc}{\protect\contentsline{subsection}{\protect\numberline{#1}#2}{#3}}}
\newcommand{\addsubsubsection}[3]{\addtocontents{toc}{\protect\contentsline{subsubsection}{\protect\numberline{#1}#2}{#3}}}


\begin{document}

\setcounter{page}{7}


% Construct contents
\addsection{}{LIST OF FIGURES}{viii}
\addsection{}{LIST OF TABLES}{ix}

\addsection{}{CHAPTERS}{}

\addsection{1}{IT'S A MATCH! OR IS IT? A LAB EXPERIMENT ON MENTORSHIP}{1}
\addsubsection{1.1}{Introduction}{1}
\addsubsection{1.2}{The Mentorship Experiment: Experiment Design}{7}
\addsubsection{1.3}{Treatments}{14}
\addsubsection{1.4}{Implementation}{17}
\addsubsection{1.5}{Experimental Results}{18}
\addsubsection{1.6}{Conclusion}{26}


\addsection{2}{ GENDER DIFFERENCES IN TOP LEADERSHIP ROLES: DOES WORKER BACKLASH MATTER?}{45}
\addsubsection{2.1}{Introduction}{45}
\addsubsection{2.2}{The Leadership Experiment: Experiment Design}{51}
\addsubsection{2.3}{Treatments}{54}
\addsubsection{2.4}{Implementation}{57}
\addsubsection{2.5}{Experimental Results}{58}
\addsubsubsection{2.5.1}{Gender differences in the decision to be manager}{59}
\addsubsubsection{2.5.2}{Gender differences in managers' decision-making}{62}
\addsubsubsection{2.5.3}{Gender differences in leadership style}{67}
\addsubsubsection{2.5.4}{Gender differences in the extent of received worker backlash}{68}
\addsubsection{2.6}{Conclusion}{70}

\addsection{3}{DEGREES OF EQUALITY: WHY ARE THERE FEWER WOMEN IN UNDERGRADUATE ECONOMICS?}{82}
\addsubsection{3.1}{Introduction}{82}
\addsubsection{3.2}{Literature Review}{83}
\addsubsection{3.3}{Experiment Design}{89}
\addsubsection{3.4}{Empirical Strategy}{91}
\addsubsection{3.5}{Implementation}{92}
\addsubsection{3.6}{Results}{93}
\addsubsection{3.7}{Strategy for the full scale study}{95}
\addsubsection{3.8}{Conclusion}{97}
    
\addsection{}{APPENDIX}{106}
\addsection{}{BIBLIOGRAPHY}{128}


\tableofcontents

\end{document}

答案1

关于如何为多行标题设置单个空格,并且第二行也缩进,有什么建议吗?

在article.cls中,\l@section定义如下:

\newcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
    \endgroup
  \fi}

所以基本上你需要做的就是修改这一点。在你的序言中你应该添加

\makeatletter
\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \setstretch{1}%
      \hangindent\@tempdima
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
    \endgroup
  \fi}
\makeatother

其中\setstretch{1}是单个空格的命令,\hangindent\@tempdima是第二行缩进的命令。

结果:结果


至于子部分,有一个类似的解决方案:

\makeatletter
\renewcommand*\l@subsection[2]{%
  \ifnum 2>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\@tempdima\baselineskip
    \setstretch{1}%
    \advance\@tempdima-\baselineskip
    \setlength{\parskip}{\@tempdima}%
    \hangindent1.5em\relax
    \leftskip 1.5em\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent 1.5em\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima 2.3em\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {#1}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #2}%
     \par}%
  \fi}
\makeatother

在这个解决方案中,

    \@tempdima\baselineskip
    \setstretch{1}%
    \advance\@tempdima-\baselineskip
    \setlength{\parskip}{\@tempdima}%
    \hangindent1.5em\relax

\l@subsection是article.cls和latex.ltx中定义的添加的部分。

结果:在此处输入图片描述


为了以防万一,这适用于小节。

\makeatletter
\renewcommand*\l@subsubsection[2]{%
  \ifnum 3>\c@tocdepth \else
    \vskip \z@ \@plus.2\p@
    {\@tempdima\baselineskip
    \setstretch{1}%
    \advance\@tempdima-\baselineskip
    \setlength{\parskip}{\@tempdima}%
    \hangindent1.5em\relax
    \leftskip 3.8em\relax \rightskip \@tocrmarg \parfillskip -\rightskip
     \parindent 3.8em\relax\@afterindenttrue
     \interlinepenalty\@M
     \leavevmode
     \@tempdima 3.2em\relax
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
     {#1}\nobreak
     \leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill
     \nobreak
     \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #2}%
     \par}%
  \fi}
\makeatother

相关内容