I'm trying to imitate Robert Bringhurst's chapter style in memoir
. The class includes one such chapter style, but does not typeset the chapter number on the right side margin, as in Bringhurst's book. This is a sample of Bringhurst's The Elements of Typographic Style (grabbed from Amazon):
My MWE is as follows:
\documentclass{memoir}
\usepackage{kantlipsum}
\makeatletter
\makechapterstyle{Bringhurst}{%
\chapterstyle{default}
\renewcommand*{\chapterheadstart}{}
\renewcommand*{\printchaptername}{}
\renewcommand*{\chapternamenum}{}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{%
\hspace{\textwidth}%
\resizebox{!}{\beforechapskip}{\chapnumfont \thechapter}%
}%
}%
\renewcommand*{\afterchapternum}{}
\renewcommand*{\printchaptertitle}[1]{%
\raggedright\large\scshape\MakeUppercase{##1}}
\renewcommand*{\afterchaptertitle}{%
\vskip\onelineskip \hrule\vskip\onelineskip}}
\makeatother
\frenchspacing
\begin{document}
\chapterstyle{Bringhurst}
\chapter{This Is My First Chapter}
\kant[3]
\end{document}
which renders thus:
How can I fix my code in order lower the chapter number to the level of the first text line before the chapter title?
Best Answer
Here is a third suggestion, this time using
xcoffins
. It has an easy and intuitive way of handling boxes that need to be joined, attached, shifted... one should note, though, thatxcoffins
' syntax might still change in the future.The basic idea is simple: define coffins (i.e. boxes)
set them to contain what you like
rotate, scale or resize them, join (bounding box is extended to contain both,
\JoinCoffins
) or attach (bounding box is not extended,\JoinCoffins*
) them using so-called handles or poles and maybe used some horizontal or vertical offsetand finally typeset them:
This is all very well explained in the documentation.
I use this idea below using three coffins:
\main
is used as a shell that will be filled with contents and typeset in the end.\titleline
is filled with a horizontal ruled and joined with\main
,\chapternumber
is filled with the scaled and coloured chapter number for numbered chapters or is left empty else. It is then attached to main and shifted into the margin and (what seemed an appropriate amount) down: