remove page numbers from table of contents

2,810 views
Skip to first unread message

RAD

unread,
May 24, 2008, 7:09:18 PM5/24/08
to LaTeX Users Group
I have an article with two parts. I would the titles of the parts to
appear in the toc, but without page numbers or the leading dots...

any clues, anyone?

jon

unread,
May 24, 2008, 10:36:04 PM5/24/08
to LaTeX Users Group
with the memoir class, you would use:

\cftpagenumbersoff{part}

(see the memoir manual, p. 115, for an example.)

cheers,
jon.

RAD

unread,
May 25, 2008, 5:01:50 AM5/25/08
to LaTeX Users Group
thanks - but i'm using the article class (or report class)

Rich

jon

unread,
May 26, 2008, 3:34:27 AM5/26/08
to LaTeX Users Group
On May 25, 5:01 am, RAD <richardarthurda...@gmail.com> wrote:
> thanks - but i'm using the article class (or report class)
>
> Rich
>
> On May 25, 3:36 am, jon <jonwrobin...@gmail.com> wrote:
>
> > On May 24, 7:09 pm, RAD <richardarthurda...@gmail.com> wrote:
>
> > > I have an article with two parts. I would the titles of the parts to
> > > appear in the toc, but without page numbers or the leading dots...
>
> > > any clues, anyone?

(it helps people follow the thread if you bottom-post.)

if you're dead set against using memoir, you'll probably want to try
something like this, then:
(note also what you need to do if you mean to use \part* rather than
\part.)


%%%%%%%%%%%%%%%%%%%%%%
\documentclass{report}
\usepackage{lipsum}

\makeatletter
\renewcommand*{\l@part}[2]{%
\par\addvspace{\topsep}
\setlength\@tempdima{2.3em}%
\noindent\hspace*{1.5em}\textbf{#1}\par}
\makeatother

\begin{document}
\tableofcontents

\part*{Part I}
\addcontentsline{toc}{part}{Part I}

\chapter{Chapter I}
\lipsum
\section{Section I}
\lipsum
\section{Section II}
\lipsum

\part{Part 2}
%\addcontentsline{toc}{part}{Part II}

\chapter{Chapter 2}
\lipsum
\section{Section 1}
\lipsum
\section{Section 2}
\lipsum

\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Reply all
Reply to author
Forward
0 new messages