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.

How do I include a chapter reference within the table of contents without giving it a chapter number? I am using the report document class.

Normally, I would create a chapter as follows:

\chapter{Some Chapter}

but this results in the chapter being given a number. Currently I am using

\chapter*{Some Chapter}

which gets rid of the number, but then it is absent from the table of contents.

share|improve this question

3 Answers 3

up vote 8 down vote accepted

You can use

\addcontentsline{toc}{chapter}{\protect\numberline{}Some chapter}

just after your \chapter*{Some chapter}. For an automated approach, define your own \chapter command (say) \mychapter:

enter image description here

\documentclass{book}
\usepackage{xparse}% http://ctan.org/pkg/xparse
\NewDocumentCommand{\mychapter}{s o m}{%
  \IfNoValueTF{#2}%
    {\global\edef\chapToCname{#3}}
    {\global\edef\chapToCname{#2}}%
  \IfBooleanTF{#1}
    {% \mychapter*
     \chapter*[\chapToCname]{#3}%
     \addcontentsline{toc}{chapter}{\protect\numberline{}\chapToCname}
    }{% \mychapter
     \chapter [\chapToCname]{#3}%
    }%
}
\begin{document}
\tableofcontents
\mychapter{A chapter}
\mychapter*{Some chapter}
\end{document}

The macro interface is provided by xparse.

share|improve this answer

You can insert it using \addcontentsline.

\documentclass{report}
\begin{document}
\tableofcontents
\chapter{A chapter}
\chapter*{Another chapter}
\addcontentsline{toc}{chapter}{Another chapter}
\end{document}
share|improve this answer

Just for the sake of completeness:

If you would use one of the KOMA-script classes scrbook or scrreprt, you could use the command \addchap, which provides exactly what you want.

share|improve this answer

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.