# Show chapter number along with Total Chapter Count in Chapter title - Memoir document class

How to show chapterNo/TotalChapterCount in the Chapter title of memoir document.

\documentclass{memoir}

\usepackage{lipsum}

\begin{document}

\tableofcontents

\chapter{First}

\lipsum

\chapter{Second}

\lipsum

\end{document}


I want the chapter title as

Chapter 1/2 First

I dont need any changes in tableofcontents.

Disclaimer: This isn't a pure memoir solution as it uses the titlesec package to customise the appearance of the titles. Also, thanks to @egreg for pointing out that titlesec and memoir don't always play well together. See About memoir and titlesec incompatibility. For a memoir solution see the answer of @daleif.

Using the totcount package (as described in How to get the number of chapters in a document).

\documentclass{memoir}
\usepackage{lipsum}

\usepackage{titlesec}
\usepackage{totcount}
\regtotcounter{chapter}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter/\total{chapter}}{20pt}{\Huge}

\begin{document}
\tableofcontents
\chapter{First}
\lipsum
\chapter{Second}
\lipsum
\end{document}

• Thanks, I was aware of totcount package, but how to add that to \chaptertitlename was my problem. – Rama Krishna Majety Aug 29 '18 at 1:56
• You should be aware that titlesec and memoir don’t go along well – egreg Aug 29 '18 at 12:17
• Thanks for pointing this out, I wasn't fully aware of the potential incompatibility issues. Have updated my disclaimer to point this out. – Milo Aug 29 '18 at 12:45

Just an addition to Milos answer, the same in just memoir

\documentclass{memoir}

\usepackage{lipsum}
\usepackage{totcount}
\regtotcounter{chapter}
\renewcommand\printchapternum{\chapnumfont \thechapter/\total{chapter}}

\begin{document}

\tableofcontents

\chapter{First}

\lipsum

\chapter{Second}

\lipsum

\end{document}


You'll need to adapt it to what ever chapter style you are using.

• Thanks I was really stuck up at this, how to adapt it to ell chapterstyle. Great help. – Rama Krishna Majety Aug 31 '18 at 15:44