3

enter image description here

I have a memoir document that has mystyle chapter copied from Modify default memoir chapter style.

How can I change the font size of the chapter to the same as that of section? Or, how I can I change the fontsize of chapters in general?

\documentclass[12pt,oneside]{memoir}

\title{Document}
\author{prosseek}
% }

% https://tex.stackexchange.com/questions/97465/modify-default-memoir-chapter-style
\makeatletter
\newcommand{\fonttitle}{\chaptitlefont}
\makechapterstyle{mystyle}{%
\def\chapterheadstart{\vspace*{\beforechapskip}}
\def\printchaptername{}
\def\printchapternum{}
\def\printchapternonum{}
\def\printchaptertitle##1{\fonttitle \space \fonttitle \thechapter.\space \fonttitle ##1}
\def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
}
\makeatother

\chapterstyle{mystyle}

\begin{document}

\maketitle
\tableofcontents

\chapter{The Domain Problem and Stakeholders}
\section{First}
abcdef. 

\end{document}
3

Since you've defined \fonttitle to be the font for your chapters, simply replace

\newcommand{\fonttitle}{\chaptitlefont}

with

\newcommand{\fonttitle}{\secheadstyle}

Note that \chaptitlefont corresponds to \Huge\bfseries while \secheadstyle (the default used in sections) corresponds to \Large\bfseries (see Section 6.9 of memoir manual).

Complete code:

\documentclass[12pt,oneside]{memoir}

\title{Document}
\author{prosseek}
% }

% http://tex.stackexchange.com/questions/97465/modify-default-memoir-chapter-style
\makeatletter
\newcommand{\fonttitle}{\secheadstyle}
\makechapterstyle{mystyle}{%
\def\chapterheadstart{\vspace*{\beforechapskip}}
\def\printchaptername{}
\def\printchapternum{}
\def\printchapternonum{}
\def\printchaptertitle##1{\fonttitle \space \fonttitle \thechapter.\space \fonttitle ##1}
\def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
}
\makeatother

\chapterstyle{mystyle}

\begin{document}

\maketitle
\tableofcontents

\chapter{The Domain Problem and Stakeholders}
\section{First}
abcdef.

\end{document} 

Output:

enter image description here

BTW: all the redundant \fonttitle can be eliminated, you can simply write:

\def\printchaptertitle##1{\fonttitle \space \thechapter.\space ##1}

Moreover, \makeatletter and \makeatother are not needed since the code between them doesn't contain the the character @.

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.