2

I was using the titlesec command \titlelabel{\thetitle.\quad} to add a period after the section number, but it isn't compatible with the memoir options :

\section[Section title in TOC][Heading section title]{Section title}

(problem already noted here About memoir and titlesec incompatibility)

My question is : how can I add this period after section number with memoir class (so, without titlesec) ?

MWE :

 \documentclass[a4paper,11pt,twoside]{memoir}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern}
    \usepackage[english,french]{babel}
    \begin{document}
    \tableofcontents*
    \chapter[Chapter title in TOC][Heading chapter title]{Chapter title}
    \section[Section title in TOC][Heading section title]{Section title}
    \end{document}
Lempeo
  • 173

1 Answers1

4

If it is just for the formatting in the text, this is enough (it will also hit subsection and subsubsection

\setsecnumformat{\csname the#1\endcsname.\quad}

The default is the same (without the dot)

daleif
  • 54,450
  • Thanks ! For the TOC, I used a titletoc code : \titlecontents{section}[3.8em]{\addvspace{0em}}% {\contentslabel[{\thecontentslabel}.]{2.3em}}% {\hspace{-2.3em}} {\titlerule*[1em]{.}\contentspage}

    It seems to work fine with memoir for the moment. But maybe there's a more appropriate way to do it with the class macros.

    – Lempeo Apr 13 '16 at 15:46