在图表列表/表格列表中添加句点

在图表列表/表格列表中添加句点

我目前正在撰写论文,遇到了一个无法解决的问题。

我的图表列表和表格列表要求在计数器(前数字)后面加一个句号。我的表格列表如下所示: 表格列表

我需要在序言中添加什么来添加句点而不删除/更改任何其他格式?

使用了以下代码(只是摘录,如果需要更多代码,请告诉我。

    %%% list of tables
\setlength{\cftbeforelottitleskip}{-10pt} % keep at 1 inch margin
\setlength{\cftafterlottitleskip}{0pt} % keep the double spacing
\renewcommand*\listtablename{LIST OF TABLES} % rename contents
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\normalsize\bfseries} % keep consistent font size
\renewcommand{\cftafterlottitle}{\hspace*{\fill}} % center title
\renewcommand\cfttabafterpnum{\vskip10pt\par}
\setlength{\cfttabindent}{0pt}  % remove indentation from tables in lot

这里我将页面添加到文档中:

    \clearpage
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables

非常感谢您的帮助。我非常感激。

最好的,丹尼尔

PS:这是我的 main.tex 的完整代码

    \documentclass[12pt,oneside,letterpaper,chapterprefix=on,numbers=noenddot]{scrbook}

%%% page set-up 
\usepackage[margin=1in,includefoot,heightrounded]{geometry} % 1 inch margins including page numbers
\usepackage{mathptmx} % times new roman
\usepackage{setspace} % double spacing in text, not captions or footnotes
\usepackage{indentfirst} % indent first paragraph
\usepackage{enumitem} % for enumeration
\usepackage[table,xcdraw]{xcolor} % table coloring
\setlength{\parindent}{2em} % adjust indentation 
\usepackage[document]{ragged2e} % ragged right
\setlength{\RaggedRightParindent}{\parindent}
%\setlist[enumerate]{topsep=0pt,itemsep=-1ex,partopsep=1ex,parsep=1ex} % enumeration spacing
%\setlist[itemize]{topsep=0pt,itemsep=-1ex,partopsep=0ex,parsep=1ex} % itemize spacing
\usepackage{comment} % a convenient package
\pagestyle{plain} % remove headers 
\usepackage[justification=raggedright,singlelinecheck=false,labelsep=period]{caption} % Captions left justify
\setkomafont{captionlabel}{\bfseries} % make caption label bold
\setkomafont{caption}{\bfseries} % make caption bold
\setcapindent{0pt} % removes hanging indent from captions
\usepackage{caption}
\captionsetup{figurename=FIGURE,tablename=TABLE}

%%% bibliography modifications
\usepackage[square,sort,comma,numbers]{natbib}
\setlength{\bibsep}{\baselineskip} % line spacing between citations
\setlength{\bibhang}{2em} %%% hanging indentation
\makeatletter
\renewcommand\NAT@bibsetnum[1]{\settowidth\labelwidth{\@biblabel{#1}}%
   \setlength{\leftmargin}{\bibindent}\addtolength{\leftmargin}{\dimexpr\labelwidth+\labelsep\relax}%
   \setlength{\itemindent}{-\bibindent}%
   \setlength{\listparindent}{\itemindent}
\setlength{\itemsep}{\bibsep}\setlength{\parsep}{\z@}%
   \ifNAT@openbib
     \addtolength{\leftmargin}{\bibindent}%
     \setlength{\itemindent}{-\bibindent}%
     \setlength{\listparindent}{\itemindent}%
     \setlength{\parsep}{0pt}%
   \fi
}
\makeatother

%%% extra code for getting the correct line spacing after references title
\let\oldbibliography\bibliography% Store \bibliography in \oldbibliography
\renewcommand{\bibliography}[1]{{%
  \let\chapter\section% Copy \section over \chapter
  \oldbibliography{#1}}}% Old \bibliography

%%% uppercase chapters
\makeatletter
%\renewcommand\sectionlinesformat[4]{%
%  \@hangfrom{\hskip#2 #3}{\MakeUppercase{#4}}%
%}
\renewcommand\chapterlinesformat[3]{%
  \@hangfrom{#2}{\MakeUppercase{#3}}%
}
\makeatother
\renewcommand\chapterlineswithprefixformat[3]{%
  \MakeUppercase{#2#3}%
}

%%% continuous table and figure numbering
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}

%%% chapter titles
\let\raggedchapter\centering
\RedeclareSectionCommand[
  beforeskip=0pt,
  afterskip=0pt]{chapter}
\setkomafont{disposition}{\bfseries\normalsize}
\setkomafont{chapter}{\normalsize}

%%% section titles
\let\raggedsection\centering
\setkomafont{section}{\normalsize} 
\RedeclareSectionCommand[
  beforeskip=0pt,
  afterskip=0.01pt]{section}

%%% remove indentation from captions
\usepackage{etoolbox}
\AtBeginEnvironment{figure}{\setlength{\RaggedRightParindent}{0em}}
\AtBeginEnvironment{table}{\setlength{\RaggedRightParindent}{0em}}
\patchcmd{\thebibliography}{\chapter*}


%%% modify table of contents
\usepackage{tocloft}
\renewcommand{\cftchapaftersnum}{.} % place a period after chapter numbers
\setlength{\cftbeforetoctitleskip}{-10pt} % keep at 1 inch margin 
\setlength{\cftaftertoctitleskip}{0pt} % keep the double spacing
\renewcommand*\contentsname{TABLE OF CONTENTS} % rename contents
\renewcommand{\cfttoctitlefont}{\hspace*{\fill}\normalsize\bfseries} % keep consistent font size
\renewcommand{\cftaftertoctitle}{\hspace*{\fill}} % center title
\KOMAoptions{toc=chapterentrydotfill} % dotted chapter entries
\setkomafont{chapterentry}{} % make chapter titles not bold
\addtokomafont{chapterentrypagenumber}{\mdseries} % make page numbers not bold
%%% indents numbered chapters
\RedeclareSectionCommand[tocnumwidth=3.5em]{chapter}
\renewcommand\addchaptertocentry[2]{%
  \ifstr{#1}{}{%
    \addtocentrydefault{chapter}{#1}{#2}%
  }{%
    \addtocentrydefault{chapter}{\hspace*{2em}#1}{#2}%
}}

%%% list of tables
\setlength{\cftbeforelottitleskip}{-10pt} % keep at 1 inch margin
\setlength{\cftafterlottitleskip}{0pt} % keep the double spacing
\renewcommand*\listtablename{LIST OF TABLES} % rename contents
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\normalsize\bfseries} % keep consistent font size
\renewcommand{\cftafterlottitle}{\hspace*{\fill}} % center title
\renewcommand\cfttabafterpnum{\vskip10pt\par}
\setlength{\cfttabindent}{0pt}  % remove indentation from tables in lot

%%% list of figures
\setlength{\cftbeforeloftitleskip}{-10pt} % keep at 1 inch margin
\setlength{\cftafterloftitleskip}{0pt} % keep the double spacing
\renewcommand*\listfigurename{LIST OF FIGURES} % rename contents
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\normalsize\bfseries} % keep consistent font size
\renewcommand{\cftafterloftitle}{\hspace*{\fill}} % center title
\renewcommand\cftfigafterpnum{\vskip10pt\par}
\setlength{\cftfigindent}{0pt}  % remove indentation from figures in lof

%%% set up appendix
%\usepackage[page,toc,title]{appendix}
%\renewcommand{\appendixtocname}{APPENDICES}
\usepackage[toc,title]{appendix}
\renewcommand{\appendixtocname}{APPENDIX: EXAMPLE CONFIGURATION SNIPPETS FOR PALO ALTO FIREWALLS}
\renewcommand{\appendixpagename}{\vspace*{\fill}\centering\normalsize APPENDICES\vspace*{\fill}}




%%% Figure packages
\usepackage{graphicx}
\graphicspath{ {figures/} }
\usepackage{wrapfig}
\usepackage{pdfpages}
\usepackage{subcaption} % allows side by side figures

\usepackage{amsmath}
\usepackage{hyperref}
\hypersetup{
    colorlinks,
    citecolor=black,
    linkcolor=black,
    urlcolor=black}


%%%-------------------------------------------------------------------------------%%%
%%%-------------------------------------------------------------------------------%%%
%%%-------------------------------------------------------------------------------%%%

\begin{document}

\frontmatter

\input{title}

\setcounter{page}{2} % start page number with 2

\input{abstract}

\input{acknowledgements}

\clearpage
\tableofcontents

\clearpage
\addcontentsline{toc}{chapter}{LIST OF TABLES}
\listoftables

\clearpage
\addcontentsline{toc}{chapter}{LIST OF FIGURES}
\listoffigures

\mainmatter

\chapter{INTRODUCTION}
\input{chapters/chapter01}

\chapter{BASICS OF VPN}
\input{chapters/chapter02}

\chapter{SECURITY ANALYSIS OF SITE-TO-SITE COMPONENTS}
\input{chapters/chapter03}

\chapter{CONCERNS ABOUT SITE-TO-SITE VPN WITH THIRD-PARTY COMPANIES}
\input{chapters/chapter04}

\chapter{SECURITY CONCEPT}
\input{chapters/chapter05}

\chapter{CONCLUSION}
\input{chapters/chapter06}

\begin{appendices}
\input{appendixAcover}
\chapter*{EXAMPLE CONFIGURATION SNIPPETS FOR PALO ALTO FIREWALLS}
\input{chapters/appendixA}
\end{appendices}

\addcontentsline{toc}{chapter}{REFERENCES}
\clearpage
\vspace*{\fill} 
\centering 
\textbf{REFERENCES}
\vspace*{\fill}
\clearpage

%\addcontentsline{toc}{chapter}{REFERENCES}
%\renewcommand\bibname{References}
%\bibliography{references}
%\bibliographystyle{IEEEtran}

\clearpage
\textbf{REFERENCES}
\renewcommand\bibname{}
\raggedright
\bibliography{references}
\bibliographystyle{IEEEtran}

\end{document}

答案1

在对 ToC 进行更改时,您必须\renewcommand{\cftchapftersnum}{.}在章节号后添加一个句点。对 LoF 和 LoT 执行类似操作:

\renewcommand{\cftfigaftersnum}{.}
\renewcommand{\cfttabaftersnum}{.}

参见tocloft文档(> texdoc tocloft)。

相关内容