我正在使用回忆录类,并且目录居中对齐。我调整了章节格式,并在下面显示我的 MWE,但索引似乎遵循了部分格式,但不是全部?例如,它没有显示前导符,这是正确的,但它是左对齐的,大小也不对?
\documentclass{memoir}
\let\ordinal\relax
\usepackage{makeidx}
\makeindex
\makeatletter
\renewcommand{\printtoctitle}[1]{\centering\HUGE\textit{Contents}}
\usepackage{fmtcount}
\renewcommand{\thechapter}{\Numberstring{chapter}}
\renewcommand{\cftchapterleader}{}
\renewcommand{\cftchapterfillnum}[1]{\hspace*{10pt}\huge#1\cftparfillskip\par}
\renewcommand*{\cftchapterfont}{}
\renewcommand\chapternumberline[1]{\hfil\Large\emph{#1}\hfil\strut\huge\par\nopagebreak\hfil}
\begin{document}
\tableofcontents*
\chapter{The First Chapter}
Here is some text.\index{text}
\chapter{The Second Chapter}
Here is some text.\index{text}
\backmatter
\printindex
\end{document}
答案1
与此类似:
\documentclass{memoir}
\let\ordinal\relax
\makeindex
\makeatletter
\renewcommand{\printtoctitle}[1]{\centering\HUGE\textit{Contents}}
\usepackage{fmtcount}
\renewcommand{\thechapter}{\Numberstring{chapter}}
\renewcommand*{\cftchapterfont}{\par\centering\huge}
\renewcommand{\chapternumberline}[1]{{\Large\itshape #1}\par}
\renewcommand{\cftchapterfillnum}[1]{~~#1\par}
% remove some grouping
\patchcmd\l@chapapp{%
{\cftchapterfont {#1}}%
}{%
\par\cftchapterfont #1%
}{\typeout{l@part patched}}{\typeout{l@part patch failed}}
\makeatother
\begin{document}
\tableofcontents*
\chapter{The First Chapter}
Here is some text.\index{text}
\backmatter
\printindex
\end{document}