按章节编号

按章节编号

这是我的序言代码。

在此处输入图片描述

我希望表格列表和图片列表按照章节显示为 2-1、2-2、2-3、3-1、3-2 等,但目录中的子子节之间没有足够的间距。我该怎么做?谢谢。

\setcounter{tocdepth}{5} % Number of section layers to show in table of contents
\setcounter{secnumdepth}{5} % Number of subsection layers to allow in document


%%%%%%%%%%%%  Set Depths for Nested Lists created by \begin{enumerate}  %%%%%%%%%%%%%%
\setlistdepth{9}
\renewlist{enumerate}{enumerate}{9}
        \setlist[enumerate,1]{label=\arabic*)}
        \setlist[enumerate,2]{label=\alph*)}
        \setlist[enumerate,3]{label=(\roman*)}
        \setlist[enumerate,4]{label=(\arabic*)}
        \setlist[enumerate,5]{label=(\Alph*)}
        \setlist[enumerate,6]{label=(\Roman*)}
        \setlist[enumerate,7]{label=\arabic*}
        \setlist[enumerate,8]{label=\alph*}
        \setlist[enumerate,9]{label=\roman*}

\renewlist{itemize}{itemize}{9}
        \setlist[itemize]{label=$\cdot$}
        \setlist[itemize,1]{label=\textbullet}
        \setlist[itemize,2]{label=$\circ$}
        \setlist[itemize,3]{label=$\ast$}
        \setlist[itemize,4]{label=$\dagger$}
        \setlist[itemize,5]{label=$\triangleright$}
        \setlist[itemize,6]{label=$\bigstar$}
        \setlist[itemize,7]{label=$\blacklozenge$}
        \setlist[itemize,8]{label=$\prime$}

\setlength{\itemsep}{0pt}
\setlength{\topsep}{0pt}
\setlength{\parskip}{8.04pt}
\setlength{\parindent}{0pt}

 %%%%%%%%%%%%  This sets linespacing (verticle gap between Lines) Default=1 %%%%%%%%%%%%%%
%\renewcommand{\arraystretch}{1.3}

% prevent certain fields in references from printing in bibliography
%\AtEveryBibitem{\clearfield{issn}}
%\AtEveryBibitem{\clearlist{issn}}
%
%\AtEveryBibitem{\clearfield{language}}
%\AtEveryBibitem{\clearlist{language}}
%
%\AtEveryBibitem{\clearfield{doi}}
%\AtEveryBibitem{\clearlist{doi}}
%
%\AtEveryBibitem{\clearfield{url}}
%\AtEveryBibitem{\clearlist{url}}
%
%\AtEveryBibitem{\clearfield{month}}
%\AtEveryBibitem{\clearfield{day}}
%
%\AtEveryBibitem{
%  \ifentrytype{misc}
%    {}
%    {\clearfield{urlyear}\clearfield{urlmonth}\clearfield{urlday}}}

\renewcommand{\arraystretch}{1.3}



%\counterwithin{table}{section}
%\counterwithout{figure}{section}

%\counterwithin*{paragraph}{section}


\numberwithin{figure}{section}
\numberwithin{table}{section}


\renewcommand{\theequation}{\thesection.\arabic{equation}}
%\renewcommand{\thefigure}{\arabic{section}.\arabic{subsection}.\arabic{figure}}
\renewcommand{\thetable}{\arabic{section}-\arabic{table}}
\renewcommand{\thefigure}{\arabic{section}-\arabic{figure}}
\numberwithin{equation}{section}% reset equation counter for sections


\setcounter{section}{2}
\setcounter{equation}{0}
%%%%%%%%%%%%%%%%%%%% Document code starts here %%%%%%%%%%%%%%%%%%%%




%%%%%%%%%%%%%%%%%%%%%%
% Start of Document
%%%%%%%%%%%%%%%%%%%%%%
%\nocite{*}
\begin{document}

\doublespacing  %set line spacing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/titlePage.tex}
\currentpdfbookmark{Title Page}{titlePage}  %add PDF bookmark for this page

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Approval Page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/Approval_Page.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Epigraph
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\input{epigraph.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dedication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\input{dedication.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Acknowledgments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagenumbering{roman}
\addcontentsline{toc}{chapter}{Acknowledgments}
\setcounter{page}{3} % set the page number appropriately based on the number of intro pages
\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/acknowledgements.tex}

%\addtocontents{toc}{\cftpagenumbersoff{chapter}} 

%\currentpdfbookmark{Acknowledgments}{acknowledgments}
%\addtocontents{toc}{\cftpagenumberson{chapter}} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Table of Contents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Format for Table of Contents
\renewcommand{\cftchapdotsep}{\cftdotsep}  %add dot separators
\renewcommand{\cftchapfont}{\bfseries}  %set title font weight
\renewcommand{\cftchappagefont}{}  %set page number font weight
\renewcommand{\cftchappresnum}{Chapter }
\renewcommand{\cftchapaftersnum}{:}
\renewcommand{\cftchapnumwidth}{5em}
\renewcommand{\cftchapafterpnum}{\vskip\baselineskip} %set correct spacing for entries in single space environment
\renewcommand{\cftsecafterpnum}{\vskip\baselineskip}  %set correct spacing for entries in single space environment
\renewcommand{\cftsubsecafterpnum}{\vskip\baselineskip} %set correct spacing for entries in single space environment
\renewcommand{\cftsubsubsecafterpnum}{\vskip\baselineskip} %set correct spacing for entries in single space environment

\renewcommand{\cftbeforefigskip}{\cftbeforechapskip}
\renewcommand{\cftbeforetabskip}{\cftbeforechapskip}


%\renewcommand{\cftfigpresnum}{}
%\renewcommand{\cftfignumwidth}{5em} % Adds some white space.

%\renewcommand{\cftchapfont}{\scshape}
%\renewcommand{\cftsecfont}{\bfseries}
%\renewcommand{\cftfigfont}{Figure }
%\renewcommand{\cfttabfont}{Table }
%\setlength{\cftbefo‌​resecskip}{-0.4cm}

%format title font size and position (this also applys to list of figures and list of tables)
%\titleformat{\chapter}[display]
%{\normalfont\bfseries\filcenter}{\chaptertitlename\ \thechapter}{0pt}{\MakeUppercase{#1}}

%\renewcommand\contentsname{Table of Contents}


%\setlength{\cftbeforechapskip}{0.4cm}
%\setlength{\cftbeforesecskip}{0.30cm}
%\setlength{\cftbeforesubsecskip}{0.30cm}
%\setlength{\cftbeforefigskip}{0.4cm}
%\setlength{\cftbeforetabskip}{0.4cm} 
%\renewcommand\contentsname{Table of Contents}

\begin{singlespace}
\tableofcontents
\end{singlespace}
\currentpdfbookmark{Table of Contents}{TOC}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% List of figures and tables
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\addcontentsline{toc}{chapter}{List of Tables}
\begin{singlespace}
    \setlength\cftbeforetabskip{\baselineskip}  %manually set spacing between entries
    \listoftables
\end{singlespace}

\clearpage

\addcontentsline{toc}{chapter}{List of Figures}
\begin{singlespace}
\setlength\cftbeforefigskip{\baselineskip}  %manually set spacing between entries
\listoffigures
\end{singlespace}

\clearpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This is the Summary (abstract should be separate document)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/abstract.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Chapters
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%
% formatting
%%%%%%%%%%%%%%%%%%%%%%

% resume page numbering for rest of document
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1} % set the page number appropriately

% Adjust chapter title formatting
%\titleformat{\chapter}[display]
%{\normalfont\bfseries\filcenter}{\MakeUppercase\chaptertitlename\ \thechapter}{0pt}{\MakeUppercase{#1}}  %spacing between titles
%\titlespacing*{\chapter}
 % {0pt}{0pt}{30pt} %controls vertical margins on title

% Adjust section title formatting
%\titleformat{\section}{\normalfont\bfseries}{\thesection}{1em}{#1}

% Adjust subsection title formatting
%\titleformat{\subsection}{\normalfont}{\uline{\thesubsection}}{0em}{\uline{\hspace{1em}#1}}

% Adjust subsubsection title formatting
%\titleformat{\subsubsection}{\normalfont\itshape}{\thesubsection}{1em}{#1}


%format title font size and position (this also applys to list of figures and list of tables)
%\titleformat{\chapter}[display]
%{\normalfont\bfseries\filcenter}{\chaptertitlename\ \thechapter}{0pt}{\MakeUppercase{#1}}

\newcommand{\sectionbreak}{\clearpage}
%\newpage
%%%%%%%%%%%%%%%%
% Chapter 1
%%%%%%%%%%%%%%%%
%\chapter{Chapter One}

\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/chapter1.tex}

%%%%%%%%%%%%%%%%
% Chapter 2
%%%%%%%%%%%%%%%%
%\chapter{Chapter Two}

\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/chapter2.tex}

%%%%%%%%%%%%%%%%
% Chapter 3
%%%%%%%%%%%%%%%%
%\chapter{Chapter Three}

\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/chapter3.tex}

%%%%%%%%%%%%%%%%
% Chapter 4
%%%%%%%%%%%%%%%%

\input{/Users/samue/Desktop/Thesis/WriteUps/New Write_Up files/Combined folder/chapter4.tex}

%%%%%%%%%%%%%%%%
% Chapter 5
%%%%%%%%%%%%%%%%

%\input{chapter 5.tex}

%%%%%%%%%%%%%%%%
% Appendices
%%%%%%%%%%%%%%%%

%\input{appendix.tex}

%%%%%%%%%%%%%%%%
% References
%%%%%%%%%%%%%%%%


\begin{singlespace}  % use single-line spacing for multi-line text within a single reference
    %\setlength\bibitemsep{\baselineskip}  %manually set separataion betwen items in bibliography to double space
    %\printbibliography[title={References}]
\end{singlespace}

\addcontentsline{toc}{chapter}{References}  %add References section to Table of Contents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Add your bibliography file here
%
\bibliographystyle{unsrt}

%%%%%%%%%%%%%%%%
% Vita 
% Only for PhD students
% Masters students remove this line
%%%%%%%%%%%%%%%%
%\input{vita.tex}
\bibliography{bibliographythesis}

\end{document}

在此处输入图片描述

相关内容