刪除回憶錄中章節旁的點

刪除回憶錄中章節旁的點

我是乳膠新手,我正在使用回憶錄包來產生目錄。我需要刪除下面目錄圖像中突出顯示的部分。我只想將其作為CHAPTER並刪除點和頁碼。

這是我的 .sty 檔案中的程式碼 ---

%%%% Do the ToC
\let\oldtoc\tableofcontents
\renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}

 \renewcommand{\contentsname}{TABLE OF CONTENTS}
 \renewcommand{\listfigurename}{LIST OF FIGURES}
 \renewcommand{\listtablename}{LIST OF TABLES}
 \renewcommand*{\tocheadstart}{\vspace*{-\topfiddle}}
 \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
 \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
 \renewcommand*{\cftchapterfont}{\normalfont}
 \renewcommand*{\cftchapterpagefont}{\normalfont}
 \renewcommand*{\cftchapterleader}{
 % \cftchapterfont\cftdotfill{\cftchapterdotsep}}
 \renewcommand*{\cftchapterdotsep}{\cftdotsep}
 %\renewcommand*{\cftchaptername}{CHAPTER~}
 %%% no extra space before the entry
 \setlength{\cftbeforechapterskip}{0pt plus 0pt}
 %% no extra 'chapter' space in LoF/LoT
 \renewcommand*{\insertchapterspace}{}

你能幫我解決這個問題嗎?

在此輸入影像描述

答案1

這是一個概念證明:

\documentclass{memoir}

\renewcommand\cftchapterdotsep{\cftdotsep}

\begin{document}
\frontmatter
\tableofcontents*
\listoftables
\listoffigures

\addtocontents{toc}{%
  \unexpanded{\unexpanded{\renewcommand{\cftchapterdotsep}{\cftnodots}}}%
}

\mainmatter
\chapter{One}

\end{document}

需要double\unexpanded是因為參數寫了兩次。

在此輸入影像描述

相關內容