Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
    
I used your second suggestion and it worked - thanks. –  COM Aug 15 '12 at 15:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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