TOC の中央揃えを改善するにはどうすればよいですか?

TOC の中央揃えを改善するにはどうすればよいですか?

セクションとサブセクションを章に合わせて中央に配置するのに苦労しています。章は中央より左にあるように見えます (または、他のすべてが中央より右にあるのでしょうか?)。

\documentclass{memoir}
\let\ordinal\relax

% TOC title
\makeatletter
\renewcommand{\printtoctitle}[1]{\centering\HUGE\textit{Contents}}

% TOC
\usepackage{fmtcount}
\setcounter{tocdepth}{2}

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

% Section
\renewcommand{\cftsectionleader}{}
\renewcommand{\thesection}{}
\renewcommand{\cftsectionfillnum}[1]{\itshape\hspace*{10pt}\large#1\cftparfillskip\par}
\renewcommand*{\cftsectionfont}{\itshape\large\hfil}

% Subsection
\renewcommand{\cftsubsectionleader}{}
\renewcommand{\cftsubsectionfillnum}[1]{\hspace*{10pt}\normalsize#1\cftparfillskip\par}
\renewcommand*{\cftsubsectionfont}{\itshape\large\hfil}

% Spacing
\setlength{\cftbeforechapterskip}{0pt}

% Document
\begin{document}
\tableofcontents*
\chapter{Chapter One}
\chapter{Chapter Two}
\chapter{Chapter Three}
\chapter{Chapter Four}
\section{Section One}
\subsection{Subsection One}
\section{Section Two}
\subsection{Subsection Two}
\subsection{Subsection Three}
\chapter{Chapter Five}
\end{document}

ここに画像の説明を入力してください

答え1

いくつかのことが起こっています。

  1. \setlength\cftchapternumwidth{0pt}スペースを確保しているが使用していないため、設定する必要があります

  2. 使用\renewcommand{\cftchapterfillnum}[1]{\hspace*{10pt}\huge#1\hfil\strut\par}

  3. グループブレースをパッチで修正する必要がある

    \makeatletter
    \patchcmd{\l@chapapp}{{\cftchapterfont {#1}}\nobreak}{\cftchapterfont {#1}\nobreak}{\typeout{ok}}{\typeout{bad}}
    \makeatother   
    

    そうしないと、\chapternumberlineトリックとタイトルがリンクされ、テキストが適切に中央に配置されなくなります。

関連情報