0

I really like Gladwell's center aligned TOC below. How would I create this with LaTeX? When I google search, the TOCs I'm finding are center justified (i.e., aligned to the margins). Sorry for the lack of code but I don't know where to begin. Not sure if matters, but I'm using memoir.

EDIT:

The one addition to Gladwell's TOC I'd like to add is parts with the format Parts <number string>: <title>. E.g., "Part One: The Beginning".

enter image description here

21
  • 3
    There's no need for a lack of code. Essentially, you should provide the community with a foundation to work from, rather than them having to type \documentclass...\end{document} themselves. So, create a base document, with some chapters and section and possibly some lipsum text, that creates a ToC. Then the community can copy-and-paste and work.
    – Werner
    Feb 10, 2023 at 0:35
  • 2
    Include in your updated post the need for the fonts that you display in the image. You just say that you "like" that ToC... but do you need both the horizontal formatting and the fonts?
    – Werner
    Feb 10, 2023 at 0:36
  • 2
    Related: How to center the TOC?
    – Werner
    Feb 10, 2023 at 0:56
  • 2
    Your "clear question" was equivalent to "I baked a cake but it was inedible". Feb 15, 2023 at 19:08
  • 2
    @buttonsrtoys If any body need any clarification, please explain properly, then only you can get better suggestion, Peter Wilson is one of a LaTeX great, so please give proper reply, your words really hurts (sorry if my words hurts you)
    – MadyYuvi
    Feb 16, 2023 at 15:29

1 Answer 1

2

Thanks to samples provided by @Werner and @der_herr_g in the comments to my OP, I got close to what I'm looking for. The only thing I'm scratching my head about is how to replace the Roman numeral with text numbers? So, instead of Part III I want Part Three?

EDIT:

Ah. I just had to add \renewcommand{\thepart}{\Numberstring{part}} . I updated my code and image below.

\documentclass{memoir}
\let\ordinal\relax

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

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

% Part
\renewcommand{\cftpartleader}{}
\renewcommand*{\cftpartfont}{}%
\renewcommand\partnumberline[1]{\centering\huge\scshape Part #1: }
\renewcommand*{\cftpartformatpnum}[1]{}%
\renewcommand{\thepart}{\Numberstring{part}}

\patchcmd\l@part{%
  {\cftpartfont {#1}}\cftpartfillnum{#2}%
}{%
  #1\cftpartfillnum{#2}%
}{\typeout{patched}%
}{}

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

% Document
\begin{document}
\tableofcontents*
\chapter*[Introduction]{Introduction}
\part{This is the First Part}
\chapter{Where it All Began}
\chapter{Some More Beginning}
\part{This is the Middle Part}
\chapter{Some Drawn-Out Diatribe}
\part{This is the Last Part}
\chapter{Starting to Wrapup}
\chapter{The Insightful Conclusion}
\end{document}

enter image description here

5
  • 1
    This is not exactly an answer to the question, so you should not post it as such. If you ask a new question, you can always add a link to this one if it provides context.
    – Vincent
    Feb 17, 2023 at 15:31
  • 1
    @Vincent. Thanks. Good point. I'll edit my OP to make it more exact. Feb 17, 2023 at 15:43
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
    – koleygr
    Feb 17, 2023 at 17:35
  • 1
    @koleygr Sorry, I'm not following. You're saying that my answer does not answer my question? I suppose I could have been clearer in my question. I'll rework it. Feb 17, 2023 at 18:56
  • 1
    @buttonsrtoys ... Sorry for this... I was just reviewing some flagged answers and questions and unfortunately I missunderstood that this was an answer that is not clearly a solution for the OP .. But this was my mistake... You may edit (by the way I never voted neggatively neither the answer neither the question). I was just trying to help by reviewing the site-field of questions and answers that are marked for close. Sorry again
    – koleygr
    Feb 17, 2023 at 19:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .