1

When I use \tableofcontents* for adding a table of contents, Roman numbers appear before the name of a part (entered by \part) and English numbers is appear before chapters (entered by \chapter). How can I change the numbering format? For example, how can I use English numbers instead of Roman ones for parts, in the table of contents.

enter image description here

  • 3
    Greek numbers and english numbers? Usually i would say that are roman (or rather Roman) numbers along with (indo-) arabic numbers. – Johannes_B Jun 12 '16 at 18:17
  • 2
    \renewcommand{\thepart}{\arabic{part} – user31729 Jun 12 '16 at 18:22
  • 1
    There is an } missing at the end of my previous comment, sorry! – user31729 Jun 12 '16 at 18:30
  • 4
    Numbers will brexit? – Bernard Jun 12 '16 at 19:02
  • There's no improvement of this post yet :-( – user31729 Jun 13 '16 at 22:30
2

The class memoir uses \addcontentsline{toc}{part}{\partnumberline{\thepart}...} -- redefining \thepart will change the numbering of parts throughout the document.

If only the way of \thepart is used in the ToC, \thepart must be redefined within a group that contains \addcontentsline, as is done in the patch!

hyperref must be loaded after the patch!

\documentclass{memoir}

\usepackage{xpatch}
\makeatletter
  \xpatchcmd{\@part}{%
    \addcontentsline{toc}{part}{\protect\partnumberline{\thepart}\f@rtoc}%
  }{%
    \begingroup
    \let\@Roman\@arabic%
    \addcontentsline{toc}{part}{\protect\partnumberline{\thepart}\f@rtoc}%
    \endgroup
}{}{}
\makeatother

\usepackage{hyperref}

\begin{document}
\tableofcontents*
\part{First part}
\chapter{First chapter}
\chapter{Second chapter}
\part{Second part}
\chapter{First chapter}
\chapter{Second chapter}

\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.