5

I'm editing a document whose preamble starts with

\documentclass [12pt, a4paper]{extbook}

I wish the chapter 'Introduction and its sections' appear in table contents at the beginning of the text before the unnumbered chapter 1.

I also would like a chapter that I call 'Prelude' and its sections' appear in table contents at the beginning of the text before the unnumbered chapter 1.

How can I do this?

Introduction ................................................. .................

             nontechnical introduction .........................

             intrudução technique .................................

             structure of the thesis ....................................

Chapter 1 ................................................ ..................

             Section 1 ..................................

             Section 2 ..................................

             Section 3 ..................................

Chapter 9 ................................................ ................

             Section 1 ..................................

             Section 2 ..................................

             Section 3 ..................................

Prelude ..................................................................

             Other open issues .........................

             New techniques ............................
4

I think you are looking for the starred versions of the \section, \part etc and a \addcontentsline{toc}{}{}.

For example:

\documentclass[12pt,a4paper]{extbook}

\begin{document}
    \tableofcontents
    \chapter*{Introduction}\addcontentsline{toc}{chapter}{Introduction}
        \section*{nontechnical introduction}\addcontentsline{toc}{section}{nontechnical introduction}
        \section*{intrudução technique}\addcontentsline{toc}{section}{intrudução technique}
        \section*{structure of the thesis}\addcontentsline{toc}{section}{structure of the thesis}

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

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

    \chapter*{Prelude}\addcontentsline{toc}{chapter}{Prelude}
        \section*{Other open issues}\addcontentsline{toc}{section}{Other open issues}
        \section*{New techniques}\addcontentsline{toc}{section}{New techniques}
\end{document}

enter image description here

2

An easier solution is to use KOMA-script and the scrbook-class and utilise the addchapand addsec commands. They are similar to the standard commands \chapter and \section except that they are unnumbered. They produce both a running head and an entry in the table of contents.

\documentclass{scrbook}

\begin{document}
    \tableofcontents
    \addchap{Introduction}
        \addsec{nontechnical introduction}
        \addsec{intrudução technique}
        \addsec{structure of the thesis}

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

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

    \addchap{Prelude}
        \addsec{Other open issues}
        \addsec{New techniques}
\end{document}

enter image description here

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.