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.
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}
\makeatletter
\def\@makechapterhead#1{%
%%%%\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@
}}
\def\@makeschapterhead#1{%
%%%%%\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}
tocloft
andtitlesec
togethertitlesec
to format the titles, I would recommend usingtitletoc
to format the TOCs rather thantocloft
. Unfortunately thetitlesec
/titletoc
documentation is rather terse to say the least.