When I create a chapter
\documentclass[12pt]{memoir}
\usepackage{graphicx}
\renewcommand{\chaptername}{}
\begin{document}
\chapterstyle{veelo}
\chapter{Implementation}
\section{Implementation2}
\end{document}
It displays it like
Chapter 1
Implementation
How can I make it display
Implementation 1
I tried doing this
\renewcommand{\chaptername}{}
But it just hides the word chapter and does display implementation and 1 in the same line.
Best Answer
The following minimal example provides a solution to your problem. It modifies the
\chapter
header printing macros to print the chapter title in place of the chapter name (Chapter
or\@chapapp
):The
veelo
chapter style is stored in\chs@veelo
, which defines the style in which the chapter title is printed. Appending (via\g@addto@macro
) a renewed definition of\printchaptername
(which now takes an argument), it replaces the former\@chapapp
printing. If you want to maintain the former chapter title font, this can be modified to set it using\chaptitlefont
. Additionally, the functionality of\printchaptertitle
is removed (setting it to\@gobble
).\@makechapterhead
actually sets the chapter heading. So,etoolbox
is used to patch it and insert the newly created\printchaptername
to take the supplied argument#1
.