# Format fonts for TOC/LOF/LOT with tocloft

my publisher requires me to change the way TOC/LOT/LOF and sections are formatted. Sadly my grasp on LaTeX and possibly on the English language is not firm enough to make heads or tails from the titlesec documentation.

In short I am tasked to have:

• Chapter titles in Uppercase, 11.2pt, centred
• Section titles in Uppercase, 10.2pt, centred
• Subsection titles in normal case 10.2pt, centred
• Subsubsection titles in normal case, 10.2pt, italics

TOC/LOT/LOF

• Each name (Table of Content,...) in Uppercase, 11.2pt
• Chapter titles in Uppercase, 11.2pt
• Section titles in Uppercase, 10.2pt
• Subsection titles in normal case 10.2pt
• Subsubsection titles in normal case, 10.2pt, italics

And a MWE reflecting on what I tried - I have reached the limit of my insights into LaTeX and cannot understand why the changes I undertook seem to be to no avail.

Help is very appreciated.

\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage[latin1]{inputenc}
\usepackage{lipsum}
\usepackage[english]{babel}
\usepackage{amsmath, amsfonts,amssymb}
\usepackage[titles]{tocloft}
\usepackage[explicit]{titlesec}

%Set depth in TOC
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

%Format of text font size and line spacing
\fontsize{10.2}{11.9}\selectfont

%TODO This is meant to be 11.2 in Uppercase
\renewcommand{\cftchapfont}{\MakeUppercase{\fontsize{11.9}{11.9}}}

%TODO This is meant to be 10.2 in Uppercase
\renewcommand{\cftsecfont}{\MakeUppercase{\fontsize{10.2}{11.9}}}

%TOOO: This is meant to be 10.2 normal font
\renewcommand{\cftsubsecfont}{\fontsize{10.2}{11.9}}

%TOOO: This is meant to be 10.2 normal font to be cursive 10.2
\renewcommand{\cftsubsubsecfont}{\fontsize{10.2}{11.9}}

%TODO: This is meant to be 10.2 normal font to be cursive 10.2
\renewcommand{\cftloftitlefont} {\MakeUppercase{\fontsize{11.9}{11.9} \selectfont}}
\renewcommand{\cftlottitlefont} {\MakeUppercase{\fontsize{11.9}{11.9} \selectfont}}

%Filling lines w/ dots.

\makeatletter
%%%%\vspace*{50\p@}% %%% removed!
{\vskip 71.4\p@ %3x(11.9+11.9)
\parindent \z@ \raggedright \fontsize{11.9}{11.9} \selectfont
\ifnum \c@secnumdepth >\m@ne
\fontsize{11.9}{11.9} \centering \selectfont \MakeUppercase{\@chapapp\space \thechapter}:
%\par
\nobreak
%\vskip 11.9\p@
\fi
\interlinepenalty\@M
\fontsize{11.9}{11.9} \MakeUppercase{#1}\par\nobreak
\vskip 23.8\p@
}}
%%%%%\vspace*{50\p@}% %%% removed!
{\parindent \z@ \raggedright
\fontsize{11.9}{11.9} \selectfont
\interlinepenalty\@M
\fontsize{11.9}{11.9} \selectfont  #1\par\nobreak
\vskip 23.8\p@
}}

\renewcommand\section{\@startsection {section}{1}{\z@}%
{44.2pt}% 2x(10.2+11.9)
{22.1pt}%
{\centering \fontsize{10.2}{11.9} \selectfont}}% from \Large

\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
{44.2pt}% 2x(10.2+11.9)
{22.1pt}%
{\centering\fontsize{10.2}{11.9} \selectfont}}% from \Large

\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{44.2pt}% 2x(10.2+11.9)
{22.1pt}%
%\noindent
{\centering \fontsize{10.2}{11.9} \selectfont}}% from \Large
\makeatother

\begin{document}
% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\tableofcontents

% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\listoffigures

% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\listoftables

%The following is just filling the document for the TOC/LOT/LOF
\chapter{Chapter One Title}
\lipsum[1-4]
\begin{figure}
\caption[Figure 1 in chapter 1]{This is figure 1.2}
\end{figure}
\lipsum[1-2]
\section{Section One}
\lipsum[1-2]
\subsection{Subsection One}
\lipsum[1-2]
\subsubsection{Subsubsection One}
\lipsum[1-2]
\begin{table}
\caption[Table 1 in Chapter 1]{This is table 1.1}
\begin{tabular}{ l c r }
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{tabular}
\end{table}
\lipsum
\begin{figure}
\caption[Figure 2 in chapter 1]{This is figure 1.2}
\end{figure}
\lipsum[1-4]
\chapter{Chapter Two Title}
\lipsum
\chapter{Chapter Three Title}
\lipsum
\end{document}

• You should not use tocloft and titlesec together
– user31729
Jan 20, 2018 at 20:16
• Since you're using titlesec to format the titles, I would recommend using titletoc to format the TOCs rather than tocloft. Unfortunately the titlesec/ titletoc documentation is rather terse to say the least. Jan 20, 2018 at 20:17
• I find it very strange that your publisher is asking for 10.2 and 11.2 pt fonts. The traditional sizes for many decades have been 10pt, 11pt, 12pt, 14pt, ... Jan 21, 2018 at 18:35

As has been mentioned in the comments, you really shouldn't use titlesec and tocloft together. The tocloft package is designed to work with the standard classes, but not with titles modified by titlesec. Since you are using titlesec to format the titles, you should use the accompanying titletoc package (by the same author) to format the TOCs.

Here's a sample document that does roughly what you want, and should be enough for you to modify as you need. You didn't specify any vertical spacing and I didn't dig through your code so I just kept the standard report class values. You also didn't specify if any of the headings were supposed to be bold, but you can add \bfseries as needed to the titling definitions.

Since you requested exactly 11.2 and 10.2 sizes I created two commands for those sizes, but since the main fontsize is not either of these, I don't quite know how they relate to the 12pt document class option.

\documentclass[12pt]{report}
\usepackage{kantlipsum}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
\newcommand{\elevenpt}{\fontsize{11.2}{12}\selectfont}
\newcommand{\tenpt}{\fontsize{10.2}{11}\selectfont}
\titleformat{\chapter}[block]{\elevenpt\filcenter}{\MakeUppercase\chaptertitlename\ \thechapter}{20pt}{\MakeUppercase{#1}}
\titleformat{\section}[block]{\tenpt\filcenter}{\thesection}{1em}{\MakeUppercase{#1}}
\titleformat{\subsection}[block]{\tenpt\filcenter}{\thesubsection}{1em}{#1}
\titleformat{\subsubsection}[hang]{\tenpt\itshape}{\thesubsubsection}{1em}{#1}
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\titlespacing*{\section}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlecontents{chapter}
[3em]
{}
{\elevenpt\contentslabel{2em}\MakeUppercase}
{\hspace*{-2em}}
{\titlerule*[1pc]{.}\contentspage}
\titlecontents{section}
[5em]
{}
{\tenpt\contentslabel{2.3em}\MakeUppercase}
{\hspace*{-2.3em}}
{\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}
[7em]
{}
{\tenpt\contentslabel{2.8em}}
{\hspace*{-2.8em}}
{\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsubsection}
[7em]
{}
{\tenpt\itshape\contentslabel{3.5em}}
{\tenpt\itshape\contentslabel{3.5em}}
{\titlerule*[1pc]{.}\contentspage}
\setcounter{tocdepth}{4}
\begin{document}
\tableofcontents
\listoffigures
\kant[1]
\kant[2]
\kant[3]
\kant[4]
\begin{figure}
\caption{A figure}
\end{figure}
\end{document}


• As writen already below for Bernard I thank you both for supplying this swift and working solution. This has troubled me for more than a week now and I hope to find the rest of the way easier now.
– E_D
Jan 21, 2018 at 0:22

Here is a possible solution with titlesec and titletoc . You should check the spacings requirements for subsections and subsubsections, as they look too large, from my point of view.

\documentclass[12pt,a4paper,twoside,openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lipsum}
\usepackage[english]{babel}
\usepackage{amsmath, amsfonts,amssymb}
\usepackage[showframe]{geometry}
\usepackage[explicit]{titlesec}
\usepackage{titletoc}
%Set depth in TOC
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{3}

%Format of text font size and line spacing
\fontsize{10.2}{11.9}\selectfont

\titlecontents{chapter}[1.2em]
{\vspace{1ex}\fontsize{10.2}{11.9}\selectfont}%
{\contentslabel{1.4em}\MakeUppercase}%
{\MakeUppercase}%
{\titlerule*[1pc]{.}\contentspage}%
%
\titlecontents{section}[2.8em]
{\vspace{0.5ex}\fontsize{10.2}{11.9}\selectfont}%
{\contentslabel{1.8em}\MakeUppercase}%
{\MakeUppercase}%
{\titlerule*[1pc]{.}\contentspage}%
%
\titlecontents{subsection}[5em]
{\fontsize{10.2}{11.9}\selectfont}%
{\contentslabel{2.58em}}%
{}%
{\titlerule*[1pc]{.}\contentspage}%
%
\titlecontents{subsubsection}[5.7em]
{\fontsize{10.2}{11.9}\selectfont}%
{\contentslabel{3.4em}}%
{}%
{\titlerule*[1pc]{.}\contentspage}%

\titleformat{\chapter}{\fontsize{11.9}{11.9}\selectfont\filcenter\MakeUppercase}{\chaptername~\thechapter:}{10pt}{#1}
\titleformat{name = \chapter, numberless}{\fontsize{11.9}{11.9}\selectfont\filcenter\MakeUppercase}{}{0pt}{#1}
\titlespacing{\chapter}{0pt}{-13pt}{23.8pt}
%
\titleformat{\section}{\fontsize{10.2}{11.9}\selectfont\filcenter\MakeUppercase}{\thesection}{8pt}{#1}
\titleformat{name = \section, numberless}{\fontsize{10.2}{11.9}\selectfont\filcenter\MakeUppercase}{}{0pt}{#1}
\titlespacing{\section}{0pt}{44.2pt}{22.1pt}
%
\titleformat{\subsection}{\fontsize{10.2}{11.9}\selectfont\filcenter}{\thesubsection}{8pt}{#1}
\titleformat{name = \subsection, numberless}{\fontsize{10.2}{11.9}\selectfont\filcenter}{}{0pt}{#1}
\titlespacing{\subsection}{0pt}{44.2pt}{22.1pt}
%
\titleformat{\subsubsection}{\fontsize{10.2}{11.9}\selectfont\itshape\filright}{\textup{\thesubsubsection}}{8pt}{#1}
\titleformat{name = \subsubsection, numberless}{\fontsize{10.2}{11.9}\selectfont\itshape\filright}{}{0pt}{#1}
\titlespacing{\subsubsection}{0pt}{44.2pt}{22.1pt}

\begin{document}
% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\tableofcontents

% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\listoffigures

% TODO: The headline should be in the same format as chapter font (11.2, uppercase)
\listoftables
\chapter*{An Unnumbered Chapter}%
\lipsum[1-10]
%The following is just filling the document for the TOC/LOT/LOF
\chapter{Chapter One Title}
\lipsum[1-4]
\begin{figure}
\caption[Figure 1 in chapter 1]{This is figure 1.2}
\end{figure}
\lipsum[1-2]
\section{Section One}
\lipsum[1-2]
\subsection{Subsection One}
\lipsum[1-2]
\subsubsection{Subsubsection One}
\lipsum[1-2]
\begin{table}
\caption[Table 1 in Chapter 1]{This is table 1.1}
\begin{tabular}{ l c r }
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9 \\
\end{tabular}
\end{table}
\lipsum
\begin{figure}
\caption[Figure 2 in chapter 1]{This is figure 1.2}
\end{figure}
\lipsum[1-4]
\chapter{Chapter Two Title}
\lipsum
\chapter{Chapter Three Title}
\lipsum

\end{document}


• Dear Bernard, thank you very much for your answer, making it work with my clumsy mashing of packages. As potentially someone else will struggle with this, I accepted Alan Munn's answer to prevent others falling into the same pitholes. I will use some combination of both of your answers to achieve my publishers requirements. Thank you both very much for taking your time to work through this -
– E_D
Jan 21, 2018 at 0:18