从回忆录中的表格/图表列表中删除虚线前导符

从回忆录中的表格/图表列表中删除虚线前导符

我已为目录设置了一种格式,其中页码位于章节名称之后,而不是由虚线分隔。但我的表格、图表等列表仍然有虚线。

我如何以与目录相同的方式格式化列表?

以下是一个最小示例中的 TOC 设置:

\documentclass{memoir}

% Put TOC page numbers after title, not on right margin
% No dotted leaders
% Set number left-aligned in a box starting 1 em to the right of title
\makeatletter
\renewcommand{\cftchapterleader}{}
\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
\renewcommand*{\cftchapterformatpnum}[1]{%
    \cftchapterformatpnumhook{#1}%
    \nolinebreak[4]\hspace*{1em}\hbox to \@pnumwidth{{\cftchapterpagefont #1}\hfill}%
}

\renewcommand{\cftsectionleader}{}
\renewcommand{\cftsectionafterpnum}{\cftparfillskip}
\renewcommand*{\cftsectionformatpnum}[1]{%
    \cftsectionformatpnumhook{#1}%
    \nolinebreak[4]\hspace*{1em}\hbox to \@pnumwidth{{\cftsectionpagefont #1}\hfill}%
}
\makeatother

\begin{document}

\frontmatter
\tableofcontents*
\listoftables
\listoffigures

\mainmatter
\chapter{Chapter}

\begin{table}
\framebox{TABLE}
\caption{Table}
\label{table1}
\end{table}

\section{Section}

\begin{figure}
\framebox{FIGURE}
\caption{Figure}
\label{figure1}
\end{figure}

\chapter{Chapter}

\begin{table}
\framebox{TABLE}
\caption{Table}
\label{table2}
\end{table}

\section{Section}

\begin{figure}
\framebox{FIGURE}
\caption{Figure}
\label{figure2}
\end{figure}

\end{document}

在此处输入图片描述

答案1

同时添加

\renewcommand{\cfttableleader}{}
\renewcommand{\cftfigureleader}{}
\renewcommand{\cfttableafterpnum}{\cftparfillskip}
\renewcommand{\cftfigureafterpnum}{\cftparfillskip}

平均能量损失

\documentclass{memoir}

% Put TOC page numbers after title, not on right margin
% No dotted leaders
% Set number left-aligned in a box starting 1 em to the right of title
\makeatletter
\renewcommand{\cftchapterleader}{}
\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
\renewcommand*{\cftchapterformatpnum}[1]{%
    \cftchapterformatpnumhook{#1}%
    \nolinebreak[4]\hspace*{1em}\hbox to \@pnumwidth{{\cftchapterpagefont #1}\hfill}%
}

\renewcommand{\cftsectionleader}{}
\renewcommand{\cftsectionafterpnum}{\cftparfillskip}
\renewcommand*{\cftsectionformatpnum}[1]{%
    \cftsectionformatpnumhook{#1}%
    \nolinebreak[4]\hspace*{1em}\hbox to \@pnumwidth{{\cftsectionpagefont #1}\hfill}%
}
\renewcommand{\cfttableleader}{}
\renewcommand{\cftfigureleader}{}
\renewcommand{\cfttableafterpnum}{\cftparfillskip}
\renewcommand{\cftfigureafterpnum}{\cftparfillskip}
\makeatother

\begin{document}

\frontmatter
\tableofcontents*
\listoftables
\listoffigures

\mainmatter
\chapter{Chapter}

\begin{table}
\framebox{TABLE}
\caption{Table}
\label{table1}
\end{table}

\section{Section}

\begin{figure}
\framebox{FIGURE}
\caption{Figure}
\label{figure1}
\end{figure}

\chapter{Chapter}

\begin{table}
\framebox{TABLE}
\caption{Table}
\label{table2}
\end{table}

\section{Section}

\begin{figure}
\framebox{FIGURE}
\caption{Figure}
\label{figure2}
\end{figure}

\end{document} 

在此处输入图片描述

相关内容