I am using \documentclass[12pt,a4paper,oneside]{report}
type of document and \tableofcontents
to generate the table of contents. I wanted the table of contents like shown in the image.
To be particular, I wanted the sentences like "Study material", "Practical manual" and "Other supporting documents" to be present at the center of the pages, along with table of contents without page numbers. Just for the sake of drawing the attention to the core, the above three headings are highlighted using red color. I want them to be in black color itself.
1 Answer
Try this
\documentclass{report}
\begin{document}
\tableofcontents
\addtocontents{toc}{\begin{center}\Large\bfseries Study material\end{center}}
\chapter{Introduction}
\chapter{Another}
\addtocontents{toc}{\begin{center}\Large\bfseries Practical manual\end{center}}
\chapter{Practical introduction}
\end{document}
Adjust the fonts to suit.
The \addtocontents{<file>}{<text>}
macro adds the <text>
to the <file>
which in your case is toc
for the table of contents file.
-
This was exactly what I was looking for. Worked perfectly as I wanted it. Apr 13, 2020 at 3:54
\part
-level directives? Another concern: The page numbers don't appear to be right-aligned -- is this intentional?\part
level directives." Please don't tell us what these lines are not; it would be far more helpful to state what they are. E.g., are they just center-set lines in the Table of Contents -- with no corresponding material in the body of the document? Conversely, if these lines do correspond to something in the document, what would this "something" be?