
Я новичок в latex и использую пакет memoir для генерации TOC. Мне нужно удалить выделенную часть на изображении TOC ниже. Я просто хочу, чтобы она была как есть, 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}
Двойной символ \unexpanded
необходим, поскольку аргумент записывается дважды.