0

I'm writing a document using the Memoir document class with the article option enabled using \documentclass[a4paper,12pt,article,oneside]{memoir}. How do I add the text "chap." after the chapter numbers, but before the skip between chapter numbering and its title? Preferably the chapters' entries in the ToC should also be affected.

The \afterchapternum and \midchapskip macros is described in Memoir's documentation, but I couldn't get it to work. My attempt to redefining \afterchapternum (which didn't work out):

\renewcommand{\afterchapternum}[0]{chap. \midchapskip}

Example:

The LaTeX document

\documentclass[article]{memoir}

\begin{document}
    \chapter{Lorem Ipsum}
\end{document}

currently results in the chapter title

1  Lorem Ipsum

but I want the result to be

1 chap.  Lorem Ipsum
2
  • As always on this site please post a full self contained minimal example. That makes it a lot easier to help (when you don't have to guess 90% of a sample document). It should not be that hard, but the article setup is probably special and I'd guess it does not use afterchapternum at all (feel free to have a look in memoir.cls), I'll have a look tomorrow (not at pc at the moment)
    – daleif
    Dec 22, 2019 at 20:08
  • @daleif: I've added a self contained minimal example now to my top post.
    – a12l
    Dec 22, 2019 at 20:18

1 Answer 1

0

Too long for a comment. The article option causes chapters to be typeset using the article chapter style. Here is the code

\makechapterstyle{article}{%
\chapterstyle{default}
\setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}
\renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
\setlength{\afterchapskip}{2.3ex \@plus .2ex}
\renewcommand{\printchaptername}{}
\renewcommand{\chapternamenum}{}
\renewcommand{\chaptitlefont}{\normalfont\Large\bfseries}
\renewcommand{\chapnumfont}{\chaptitlefont}
\renewcommand{\printchapternum}{\chapnumfont \thechapter\quad}
\renewcommand{\afterchapternum}{}}

Thus you could just copy and change \printchapternum

2
  • Thanks! To make it clear to people reading this: the solution is to add \renewcommand{\printchapternum}{\chapnumfont \thechapter \enskip chap. \quad}. The \enskip command add a small space between the chapter number and the text chap. You don't happen to know what I should do to make my change also affect the ToC?
    – a12l
    Dec 22, 2019 at 20:52
  • Lookup \cftchaptername in the manual
    – daleif
    Dec 22, 2019 at 21:04

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.