# Misalignment of Chapter number and chapter title in memoir southall chapterstyle

I have the number and chapter title in the southall chapterstyle in memoir class not aligned vertically. How to fix it?

-
By number I mean chapter number. – Shuv Mar 20 '13 at 9:06
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Anke Mar 20 '13 at 9:06

The southall style uses two minipages with top alignment to typeset the chapter number and the chapter title, so the chapter number will be vertically aligned with the first (upper) line of the title, as the following simple example demonstrates:

\documentclass{memoir}
\chapterstyle{southall}

\begin{document}

\chapter{Test Chapter with a Long Title Spanning Several Lines, just to Illustrate the Vertical Alignment}

\end{document}


If you want to change this default alignment, you need to change the alignment for the miniboxes; the original definition for the southall theme is something like

\makechapterstyle{southall}{%
\setlength{\afterchapskip}{5\baselineskip}
\setlength{\beforechapskip}{36pt}
\setlength{\midchapskip}{\textwidth}
\renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchapternum}{%
\begin{minipage}[t][\baselineskip][b]{\beforechapskip}
{\vspace{0pt}\chapnumfont%%%\figureversion{lining}
\thechapter}
\end{minipage}}
\renewcommand*{\printchaptertitle}[1]{%
\hfill\begin{minipage}[t]{\midchapskip}
{\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
\renewcommand*{\afterchaptertitle}{%
\par\vspace{\baselineskip}%
\hrulefill \par\nobreak\noindent \vskip\afterchapskip}}


The lines that you will have to change are

\begin{minipage}[t][\baselineskip][b]{\beforechapskip}


and

\begin{minipage}[t]{\midchapskip}


For example, to get the chapter number vertically aligned with the last (lower) line of the title, you will need to use the b specifier:

\begin{minipage}[b]{\beforechapskip}


and

\begin{minipage}[b]{\midchapskip}


Here's a complete example:

\documentclass{memoir}

\makechapterstyle{mysouthall}{%
\setlength{\afterchapskip}{5\baselineskip}
\setlength{\beforechapskip}{36pt}
\setlength{\midchapskip}{\textwidth}
\renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{}
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchapternum}{%
\begin{minipage}[b]{\beforechapskip}
{\vspace{0pt}\chapnumfont%%%\figureversion{lining}
\thechapter}
\end{minipage}}
\renewcommand*{\printchaptertitle}[1]{%
\hfill\begin{minipage}[b]{\midchapskip}
{\vspace{0pt}\chaptitlefont ##1\par}\end{minipage}}
\renewcommand*{\afterchaptertitle}{%
\par\vspace{\baselineskip}%
\hrulefill \par\nobreak\noindent \vskip\afterchapskip}}
\chapterstyle{mysouthall}

\begin{document}

\chapter{Test Chapter with a Long Title Spanning Several Lines, just to Illustrate the Vertical Alignment}

\end{document}


And now the alignment is at the bottom:

Changing b to c as the alignment specifier for both minipages will result in the chapter number vertically aligned at the center with regard to the title.

-