在目录中包含单词 chapter

在目录中包含单词 chapter

如何在简介章节前添加“Chapter”一词?

在此处输入图片描述

\documentclass[12pt,reqno]{siugrad51}
\usepackage{titlesec}
\usepackage[titletoc,title]{appendix}
\usepackage{titletoc}
\usepackage[nottoc]{tocbibind}
\setcounter{secnumdepth}{7}
\setcounter{tocdepth}{7}



 \begin{document}

\addtocontents{toc}{\vspace{-0.45in} {CHAPTER} ~\hfill \underline{PAGE}\par}
%\addcontentsline



%\addtocontents{toc}{{CHAPTER}{PAGE}\par}


\renewcommand\listfigurename{LIST OF FIGURES}
\renewcommand\listtablename{LIST OF TABLES}

\addtocontents{lot}{\vspace{-0.15in} \underline{TABLE} ~\hfill \underline{PAGE}\par}
\addtocontents{lof}{\vspace{-0.15in} \underline{FIGURE} ~\hfill \underline{PAGE}\par}
%\listoftables        % comment out if no tables
\renewcommand{\numberline}[1]{#1~}


\tableofcontents
%\renewcommand\cftappendixname{\appendicname~}
{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\tablename~\oldnumberline}%
    \listoftables%
}


{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\figurename~\oldnumberline}%
    \listoffigures%
}


\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
%\raggedright
\parindent=.35in


\input{introduction}

\chapter{Introduction}


\section{Emerging Trends}





\end{document} 

答案1

使用该tocloft包。

% chaptertocprob.tex  SE 576370

%\documentclass[12pt,reqno]{siugrad51} %% I do not know/have this class
\documentclass{report}
\usepackage{titlesec}
\usepackage[titletoc,title]{appendix}
\usepackage{titletoc}
\usepackage[nottoc]{tocbibind}
\setcounter{secnumdepth}{7}
\setcounter{tocdepth}{7}

\usepackage{comment}
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter } % put this before chapter number
\setlength{\cftchapnumwidth}{6em} % more space for enhanced chapter number

\begin{document}

\addtocontents{toc}{\vspace{-0.45in} {CHAPTER} ~\hfill \underline{PAGE}\par}
%\addcontentsline

%\addtocontents{toc}{{CHAPTER}{PAGE}\par}

\renewcommand\listfigurename{LIST OF FIGURES}
\renewcommand\listtablename{LIST OF TABLES}

\addtocontents{lot}{\vspace{-0.15in} \underline{TABLE} ~\hfill \underline{PAGE}\par}
\addtocontents{lof}{\vspace{-0.15in} \underline{FIGURE} ~\hfill \underline{PAGE}\par}
%\listoftables        % comment out if no tables
%\renewcommand{\numberline}[1]{#1~}  %% don't do this here

\tableofcontents

%\renewcommand\cftappendixname{\appendicname~}
{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\tablename~\oldnumberline}%
    \listoftables%
}

{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\figurename~\oldnumberline}%
    \listoffigures%
}

\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
%\raggedright
\parindent=.35in

%%\input{introduction}  % not made available

\chapter{Introduction}


\section{Emerging Trends}

\end{document} 

上面的 MWE 基本上是你的,但我添加了tocloft命令来放置章节\renewcommand{\numberline}...在目录中的章节号之前。为了使它正常工作,我必须在 之前注释掉tableofcontents

在此处输入图片描述

答案2

\titlecontents以下是使用命令执行此操作的方法titletoc

\documentclass[12pt,reqno]{report}%{siugrad51}
\usepackage{titlesec}
\usepackage[titletoc,title]{appendix}
\usepackage{titletoc}
\usepackage[nottoc]{tocbibind}
\setcounter{secnumdepth}{7}
\setcounter{tocdepth}{7}

\titlecontents{chapter}[0em]{\medskip}
{\MakeUppercase{\chaptername}\enspace \thecontentslabel.\enspace}
{}
{\titlerule*[1pc]{.}\titlerule*[1pc]{.}\contentspage}

 \begin{document}

\addtocontents{toc}{\vspace{-0.45in} {CHAPTER} ~\hfill \underline{PAGE}\par}

\renewcommand\listfigurename{LIST OF FIGURES}
\renewcommand\listtablename{LIST OF TABLES}

\addtocontents{lot}{\vspace{-0.15in} \underline{TABLE} ~\hfill \underline{PAGE}\par}
\addtocontents{lof}{\vspace{-0.15in} \underline{FIGURE} ~\hfill \underline{PAGE}\par}
%\listoftables % comment out if no tables
\renewcommand{\numberline}[1]{#1~}

\tableofcontents
{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\tablename~\oldnumberline}%
    \listoftables%
}

{%
    \let\oldnumberline\numberline%
    \renewcommand{\numberline}{\figurename~\oldnumberline}%
    \listoffigures%
}

\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\parindent=.35in

\chapter{Introduction}

\section{Emerging Trends}

\end{document} 

在此处输入图片描述

相关内容