1

I'm using the memoir class and have a TOC that is center aligned. I adjust the chapter formatting and shown in my MWE below, but the index seems to follow some of the formatting but not all of it? E.g., it's not showing a leader, which is correct, but it's left-justified and the wrong size?

![enter image description here

\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 Answers1

2

Something similar to this:

\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}

daleif
  • 54,450
  • It’d be better to patch to \par\cftchapterfont {#1}% in case someone for instance wants to make it lowercase – Fredrik P Aug 08 '23 at 14:17