[Tex/LaTex] Bringhurst chapter style in memoir

chaptersmemoirsectioning

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):

Bringhurst

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:

mine

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, that xcoffins' syntax might still change in the future.

The basic idea is simple: define coffins (i.e. boxes)

\NewCoffin\testA
\NewCoffin\testB

set them to contain what you like

\SetHorizontalCoffin\testA{\huge A}
\SetHorizontalCoffin\testB{bbb}

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 offset

% join bottom center of \testA with top center of \testB
% and shift \testB 1em down:
\JoinCoffins\testA[hc,b]\testB[hb,t](0pt,-1em)

and finally typeset them:

\TypesetCoffin\testA

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:

\documentclass[b5paper]{memoir}
\usepackage[T1]{fontenc}
% not then font used by Bringhurst, but anyway:
\usepackage{libertine}
% we want to letterspace uppercased words and those in small caps, so:
\usepackage{microtype}

% the chapter style:
\usepackage{xcoffins,xcolor}
\NewCoffin\main
\NewCoffin\titleline
\NewCoffin\chapternumber

\makechapterstyle{Bringhurst}{%
  \renewcommand*\chapterheadstart{}
  \renewcommand*\printchaptername{}
  \renewcommand*\chapternamenum{}
  \renewcommand*\afterchapternum{}
  % numbered chapters:
  \renewcommand*\printchapternum{%
      \SetHorizontalCoffin\chapternumber{%
      \textcolor{black!10}{\thechapter}%
    }%
    \ScaleCoffin\chapternumber{8}{8}%
  }
  % unnumbered chapters:
  \renewcommand*\printchapternonum{\SetHorizontalCoffin\chapternumber{}}
  \renewcommand*\printchaptertitle[1]{%
    \memRTLraggedright\normalfont\large\MakeUppercase{\textls[75]{##1}}}
  \renewcommand*\afterchaptertitle{%
    \vskip.5\onelineskip
    \SetHorizontalCoffin\titleline{\color{black!50}\rule{\linewidth}{1.5pt}}%
    \JoinCoffins\main\titleline
    \JoinCoffins*\main\chapternumber(\textwidth+\marginparsep,-4\baselineskip)%
    \TypesetCoffin\main
    \vskip\onelineskip
  }
}

\chapterstyle{Bringhurst}

% sections and subsections:
\setsecnumformat{\normalfont\csname the#1\endcsname\quad}

% the section style:
\newcommand\uppercasehead[1]{%
  \noindent\normalfont\scshape\MakeLowercase{\textls[50]{#1}}}
\setsecindent{0pt}
\setsecheadstyle{\uppercasehead}

% the subsection style:
\newcommand\itshapehead[1]{\normalfont\itshape#1}
\setsubsecheadstyle{\itshapehead}
\setsecnumdepth{subsection}

% the subsubsection style:
\setsubsubsecheadstyle{\itshapehead}

\usepackage{lipsum}
\begin{document}

\chapter{The Grand Design}
\section{First Principles}
\subsection{Typography exists to honor content}

\lipsum

\end{document}

enter image description here