6

In my thesis all my chapters are grouped as a part (titled CHAPTERS). I want the part to appear in the TOC, but do not want a part page. The part is showing up fine in the toc, but the part page shows up before the first chapter and I don't want it to show up at all. That is I don't want the part titled CHAPTERS to appear anywhere except for the toc. Here's a MWE.

\documentclass[11pt, letterpaper]{thesis}

\usepackage{fancyhdr}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\cfoot{\thepage}

\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}

\usepackage[title,titletoc]{appendix}

\usepackage{etoolbox}

\usepackage{tocloft}
\makeatletter
\renewcommand{\numberline}[1]{%
  \@cftbsnum #1\@cftasnum~\@cftasnumb%
}
\makeatother

\usepackage{titlesec}
\assignpagestyle{\chapter}{fancy}
\titleformat{\chapter}[display]{\normalfont \centering}{CHAPTER \chaptertitlename\ \thechapter}{11 pt}{}
\titleformat{\section}[display]{\normalfont \centering}{}{11 pt}{}

\begin{document}
\renewcommand{\cftpartfont}{\normalfont}
\renewcommand{\cftchapfont}{\normalfont}
\renewcommand{\cftsecfont}{\normalfont}
\renewcommand{\cftpartpagefont}{\normalfont}
\renewcommand{\cftchappagefont}{\normalfont}
\renewcommand{\cftdotsep}{\cftnodots}

\setcounter{tocdepth}{1}
\setcounter{secnumdepth}{2}
\cftsetindents{chapter}{.5in}{1.0in}
\cftsetindents{section}{1.0in}{1.0in}
\setlength{\cftchapnumwidth}{2em}

\setlength\cftbeforechapskip{11pt}
\renewcommand\cftchapafterpnum{\vskip11pt}
\setlength{\cftbeforesecskip}{0pt}

\addcontentsline{toc}{part}{CONTENTS}

\renewcommand{\tocloftpagestyle}[1]{\def\@cftpagestyle{\thispagestyle{#1}}}
\tocloftpagestyle{empty}
\renewcommand*\contentsname{\centerline{CONTENTS}}
\renewcommand{\cfttoctitlefont}{\normalfont}

\tableofcontents
\newpage  

\part*{CHAPTERS} % Use this so "Part" won't show up before title in toc 
\addcontentsline{toc}{part}{CHAPTERS}

\chapter{First Chapter}
\thispagestyle{fancy}

\chapter{Second Chapter}
\thispagestyle{fancy}

\end{document}
9

A simple solution is to redefine \part so that it adds an entry in the table of contents but it does not print anything.

So you can use

\renewcommand{\part}[1]{\addcontentsline{toc}{part}{#1}}

Alternatively, you can just use

\addcontentsline{toc}{part}{<Header of the part>}

at the appropriate places.

  • I used your second suggestion and it worked - thanks. – COM Aug 15 '12 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.