[Tex/LaTex] Creating a specific chapter style using memoir

chaptersmemoirsectioning

I'm completely new to using TeX but have managed over the past couple of days to get a basic setup working for my thesis using memoir.

I've been exploring the chapter heading styles at http://www.tex.ac.uk/tex-archive/info/MemoirChapStyles/MemoirChapStyles.pdf to try and figure out how to customise chapter heading layouts.

I have a specific style which I'm trying to recreate (see image below), but I'm unsure how to go about positioning and aligning the chapter numbers and titles side by side in this manner.

enter image description here

The key features are that the elements are:

  • Next to each other
  • With a slightly wider margin than usual
  • With the chapter title extending to the right of a fixed point, potentially onto multiple lines and the chapter number to the left of it

Best Answer

Here's one possible solution using two \parboxes (change the fonts and lengths to suit your needs):

\documentclass{memoir}

\newlength\chaptitlelength
\setlength\chaptitlelength{4cm}

\makeatletter
\makechapterstyle{mystyle}{%

\renewcommand{\chapnamefont}{\normalfont\Huge\itshape}
\let\chapnumfont\chapnamefont
\renewcommand{\chaptitlefont}{\normalfont\huge\scshape}

\def\printchaptername{\parbox[t]{\chaptitlelength}{\chapnamefont\@chapapp\space\chapnumfont\thechapter}}
\def\printchapternum{}
\def\afterchapternum{\space}
\def\printchapternonum{}
\def\printchaptertitle##1{\parbox[t]{\dimexpr\linewidth-\chaptitlelength-2em\relax}{%
  \chaptitlefont\raggedright\scshape ##1}}
\def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
}
\makeatother
\chapterstyle{mystyle}

\begin{document}

\chapter{Introduction to my research and what it's all about}

\end{document}

enter image description here