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.

My question is very similar to this, but a little more complicated - Yet another leader dot question and related for TOC

I am trying to format my ToC using the memoir class. I want my ToC to look like this..

           TABLE OF CONTENTS
                               Page
LIST OF TABLES ................. i 
LIST OF FIGURES ................ ii
CHAPTER
1 First chapter ................ 1
  subheading ................... 2
2 Second chapter ............... 3

Using the pwasu style file and memoir provided commands within, I have been able to make my ToC formatted to look like this...

           TABLE OF CONTENTS
                               Page
LIST OF TABLES ................. i 
LIST OF FIGURES ................ ii
CHAPTER ........................ 1
1 First chapter ................ 1
  subheading ................... 2
2 Second chapter ............... 3

Here is my current code...

\documentclass[oneside,12pt]{memoir}
\usepackage{pwasu}
\begin{document}
\tableofcontents*
\listoftables
\listoffigures
\addcontentsline{toc}{chapter}{CHAPTER}
\chapter{First chapter}
\end{document}

Here is my best representation of minimal code from pwasu

\let\oldtoc\tableofcontents
\renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}
\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand*{\tocheadstart}{\vspace*{-\topfiddle}}
\renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
  \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
\renewcommand*{\cftchapterfont}{\normalfont}
\renewcommand*{\cftchapterpagefont}{\normalfont}
\renewcommand*{\cftchapterleader}{%
  \cftchapterfont\cftdotfill{\cftchapterdotsep}}
\renewcommand*{\cftchapterdotsep}{\cftdotsep} %%%% 
%\renewcommand*{\cftchaptername}{CHAPTER~}
\setlength{\cftbeforechapterskip}{0pt plus 0pt}
\renewcommand*{\insertchapterspace}{}

I want to get rid of the leaders and page number from the added content line, CHAPTER, as it is only there to signify the chapter numbers of subsequent chapters.

share|improve this question
    
Welcome to TeX.SX! Please add a fully compilable minimal working example (MWE) that illustrates your problem. In particular, either provide the pwasu package or merge the relevant part with your current code. When I tried to do that, \undefinedpagestyle was reported as Undefined control sequence. –  canaaerus Aug 1 '12 at 19:39
add comment

1 Answer 1

To add the word "CHAPTER", you can use the \cftaddtitleline command; its syntax is

\cftaddtitleline{ext}{kind}{title}{page}

so with an empty fourth argument you suppress the page number.

A quick (somehow hackish way) to remove the leaders (dots) for this particular entry is to introduce a local change with \cftlocalchange and then restore the original settings using again this command. An example illustrating this approach; probably the first argument (309pt) for \cftlocalchange will have to be slightly changed depending on the actual settings introduced by the file pwasu.sty (which is not available on CTAN):

\documentclass[oneside,12pt]{memoir}

\renewcommand{\contentsname}{TABLE OF CONTENTS}
\renewcommand{\listfigurename}{LIST OF FIGURES}
\renewcommand{\listtablename}{LIST OF TABLES}
\renewcommand*{\aftertoctitle}{\thispagestyle{plain}%
  \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}
\renewcommand*{\cftchapterfont}{\normalfont}
\renewcommand*{\cftchapterpagefont}{\normalfont}
\renewcommand*{\cftchapterleader}{%
  \cftchapterfont\cftdotfill{\cftchapterdotsep}}
\renewcommand*{\cftchapterdotsep}{\cftdotsep} %%%% 
\renewcommand*{\cftchaptername}{CHAPTER~}
\setlength{\cftbeforechapterskip}{0pt plus 0pt}
\renewcommand*{\insertchapterspace}{}

\begin{document}

\tableofcontents*
\listoftables
\listoffigures

\cftlocalchange{toc}{309pt}{0cm}% change settings to suppress dots
\cftaddtitleline{toc}{chapter}{CHAPTER}{}% add word "CHAPTER"
\cftlocalchange{toc}{1.55em}{2.55em}% restore original settings
\chapter{First chapter}

\end{document}

enter image description here

share|improve this answer
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.