I am trying to create table of contents for a book
class as shown below.
How could this be achieved? I looked around and tried to use the tocloft
package but I end up in errors. Below is a MWE, where I commented out th tocloft
package macros.
\documentclass[10pt,
]{book} % document type and language
\usepackage[l2tabu,orthodox]{nag} % force newer (and safer)
% LaTeX commands
%% Page dimensions
\usepackage[portrait,
a5paper,
hmargin=0.75in,
vmargin={0.88in, 0.94in},
]{geometry} % control page layout
%% Fonts & languages
\usepackage[utf8]{inputenc} % type Unicode characters
% directly from the keyboard
\usepackage[T1]{fontenc} % font encoding
\usepackage[english]{babel} % multi-language support
\usepackage[protrusion=true,
expansion=true,
final,
babel,
]{microtype} % improves word spacing
\usepackage{lmodern}
%% Lists & tables
\usepackage{enumitem} % more list formatting options
\usepackage[raggedrightboxes]{ragged2e} % text justification
\usepackage[pdftex,
bookmarks,
colorlinks,
breaklinks,
hypertexnames=false,
]{hyperref} % pdf coloured hyperlinks
% TOC customisation
\iffalse
\usepackage[titles]{tocloft}
\renewcommand{\cftchapdotsep}{\cftdotsep}
\renewcommand{\cftmarkZ}{}
\renewcommand{\cftafterZtitle}{%
\\
[\baselineskip]
\mbox{}
\hfill{\normalfont PAGE}
}
\fi
\begin{document}
\raggedbottom
\frontmatter
\pagenumbering{gobble}
\chapter*{PREFACE}%
\label{cha:PREFACE}
\thispagestyle{empty}
\tableofcontents
\mainmatter{}
\chapter{FIRST CHAPTER}%
\label{cha:FIRST_CHAPTER}
\chapter{SECOND CHAPTER}%
\label{cha:SECOND_CHAPTER}
\chapter{THIRD CHAPTER}%
\label{cha:THIRD_CHAPTER}
\chapter{FOURTH CHAPTER}%
\label{cha:FOURTH_CHAPTER}
\end{document}
When I uncomment, I end up with the following error messages compiling with pdftex
! LaTeX Error: Command \cftmarkZ undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.40 \renewcommand{\cftmarkZ}
{}
Please let me know how to proceed futher. Thank you.