1

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
    Commented Dec 22, 2019 at 20:08
  • @daleif: I've added a self contained minimal example now to my top post.
    – a12l
    Commented Dec 22, 2019 at 20:18

1 Answer 1

1

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

5
  • 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
    Commented Dec 22, 2019 at 20:52
  • Lookup \cftchaptername in the manual
    – daleif
    Commented Dec 22, 2019 at 21:04
  • @daleif how do we access the manual?
    – nilon
    Commented Jun 19 at 15:09
  • Is there a way to remove the wording "Chapter", to leave only numbers?
    – nilon
    Commented Jun 19 at 15:10
  • @nilon please don't highjack questions. Post your own question on the site. All pakcages have manuals, you can find them on ctan.org or texdoc.net.
    – daleif
    Commented Jun 19 at 15:41

You must log in to answer this question.

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