Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question
    
By number I mean chapter number. –  Shuv Mar 20 '13 at 9:06
3  
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

1 Answer 1

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}

enter image description here

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}
\addtolength{\midchapskip}{-\beforechapskip}
\renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
\renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\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}
\addtolength{\midchapskip}{-\beforechapskip}
\renewcommand*{\chapterheadstart}{\vspace*{2\baselineskip}}
\renewcommand*{\chaptitlefont}{\huge\rmfamily\raggedright}
\renewcommand*{\chapnumfont}{\chaptitlefont}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\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:

enter image description here

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.