I want create table of contents As follows:

Chapter first (chapter name)

1.1 (section name)

1.2 (section name)

1.2.1 (subsection name)

Chapter second (chapter name)

2.1 (section name)

2.1.1 (subsection name)

2.2 (section name)

Please guide me.

Thanks in advance

  • 1
    Hi and welcome. Where are you stuck? Having the chapter unnumbered or having the sections numbered the way they are. Or producing a toc in the first place? – Johannes_B Oct 20 '14 at 7:49
  • @Johannes_B: I believe, its the ordinal numbers first, second etc, as the title of the question proposes. – user31729 Oct 20 '14 at 7:50

This is a solution that depends on the book class, by removing patching the \@chapter macro, changing the \addcontentsline entry and setting it to \Ordinalstring{chapter} from fmtcount package.



\patchcmd{\@chapter}{\addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}}{\addcontentsline{toc}{chapter}{\protect{\numberline{\chaptername~\Ordinalstring{chapter} #1}}}}{}{}


\chapter{Some chapter name}

\section{Number one}

\subsection{Subsec Number one}

\chapter{Another chapter name}

\section{Number one from 2nd chapter}

\subsection{Subsec Number one}


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.