I use the memoir class in writing an abstract and use only sections and subsections and got an empty table of contents. How do I fix this? I did like here: memoir without chapters but it didn't help.

My code:


% --------------------------------------------------------

%%% Колонтитулы %%%
\usepackage[final]{microtype} % межсимовольный рендеринг, борящийся с оверфуллами

    Path           = ./fonts/STIXv2.0.2/ ,
    UprightFont    = *-Regular ,
    BoldFont       = *-Bold ,
    ItalicFont     = *-Italic ,
    BoldItalicFont = *-BoldItalic ]

    Path = ./fonts/STIXv2.0.2/ ]


\OnehalfSpacing* %полуторный интервал для всего текста
\renewcommand\tableofcontents{\large {\textbf{Содержание}}} %%% переименовали оглавление в memoir на содержание
% --------------------------------------------------------




  • 1
    Please make sure your example is self contained, you input stuff we don't have access to
    – daleif
    Commented Oct 7, 2020 at 18:28
  • There is a good chance that the line \renewcommand\tableofcontents{\large {\textbf{Содержание}}} is at fault here since you ask \tableofcontents to just print a word. What you want is to do \renewcommand{\contentsname{Содержание}}
    – KersouMan
    Commented Oct 7, 2020 at 18:35
  • just for example: ru.overleaf.com/6739953172hwfccyttkfny
    – Fidelity
    Commented Oct 7, 2020 at 18:44
  • I edit by your @KersouMan example and the compiler returned an error: command \contentsname{Содержание} undefined.
    – Fidelity
    Commented Oct 7, 2020 at 18:52
  • 1
    We can't quite tell what you did because you didn't use TeX.SE formatting. Regardless, it's better to post your answer as an answer, so that it can be voted on.
    – Teepeemm
    Commented Oct 7, 2020 at 20:05

4 Answers 4


If I understand your self answer correctly, you just want to use nu-numbered sections and still have their title show up in the TOC?

That is easy with memoir

\maxsecnumdepth{none} % due to \mainmatter

and then use \section and friends as normal.

  • Thank you for your response, simple and working code.
    – Fidelity
    Commented Oct 8, 2020 at 13:16

If you want to use memoir with only section and below then use it with the article option, whereby \chapter is set at \section, \section is set as \subsection, etc.

Thank you for your MWE which didn't work for me as I didn't have the font you were using. Here is a very stripped down version of your MWE which does not typeset chapters and gives a ToC.

% memtocprob.tex SE 565843




%\section{Introduction} %\input{introduction}
Introductory text.
More text.

However, if you uncomment the \usepackage[english,russian]{babel} then no ToC is produced. The problem lies in the use of the babel package which I have never used.

  • It remains a mystery to me why such a powerful the memoir class is not optimized for working with babel?
    – Fidelity
    Commented Oct 8, 2020 at 8:54
  • @user226232 we cannot control what babel and its languages does or when users misuse macros that clearly should only contain text. I have no issues with Peters example on an up to date TL20 once russian fonts have been generated.
    – daleif
    Commented Oct 8, 2020 at 10:05
  • @PeterWilson what does your system do when that babel line is used? After mine finished generating russian bitmap fonts I have a toc with a russian header and two items written in English
    – daleif
    Commented Oct 8, 2020 at 10:06
  • thank you for your answer, I made a code based on your example.
    – Fidelity
    Commented Oct 8, 2020 at 12:55
  • @daleif I have emailed you seperately about this, but essentially I don't have the russian font. Commented Oct 8, 2020 at 17:11

The problem was solved by the method suggested here: https://stackoverflow.com/a/4002358



I replaced all \section with \huection and all \subsection with \subhuection.

  • So you only have un-numbered sections? Then we can do something easier, \setsecnumdepth{none}\maxsecnumdepth{none} and then you can just use \section as normal. It is not easy to figure out your intensions from your example when you don't show us code you can use.
    – daleif
    Commented Oct 8, 2020 at 9:12

You do not need newcommands, nor the \counterwithout{section}{chapter} tricks.

Using the article option \chapters are like section, so you only have to replace \section by \chapter and \subsection by \section and so on with sublevel, if thre are some.

Note that starred versions of sectioning commands (\chapter*, \sections*, etc.) are designed to (1) be unnumbered and (2) do dot appear in the ToC.

If you want only not numbered headers modify secnumdepth (as daleif pointed, in memoir you can use \setsecnumdepth and \maxsecnumdepth for this, see section 6.3 of the memoir's manual) and to show these in the ToC setting tocdepth properly: Example using the standard \setcounter:

\chapter{foo} The (fake) section
\section{bah} The (fake) subsection

In case that you want mix numbered and unnumbered chapters and sections in the ToC, use the starred and not starred versions and \addcontentsline as needed. Example:

\chapter{foo} The (fake) section
\section{bah} The (fake) subsection
\chapter*{baz} Another  (fake) section
\section*{buf} Another  (fake) subsection
  • Thank you for your response, this code really works.
    – Fidelity
    Commented Oct 8, 2020 at 12:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .