[Tex/LaTex] modifying part style in memoir class to match ell chapterstyle

memoir

I've selected ell chapterstyle using the memoir class. Following tips I found in Part style in memoir class and A modification of \part style in memoir and looking at the ell definition in memoir.cls I've gotten fairly close to matching the part style to this chapterstyle:

\documentclass[openany]{memoir}

\chapterstyle{ell}

\renewcommand{\midpartskip}{\begingroup
 \vspace*{\beforechapskip}%
 \begin{adjustwidth}{}{-\chapindent}%
 \hrulefill
 \smash{\rule{0.4pt}{15mm}}
 \end{adjustwidth}\endgroup}

% numeric instead of roman numeral for the part num:
\renewcommand*{\thepart}{\arabic{part}}
% ell like Fonts: 
% 
% ragged left: from https://tex.stackexchange.com/questions/42489/a-modification-of-part-style-in-memoir
% (moves the text to the right)
\renewcommand*{\parttitlefont}{\normalfont\huge\sffamily\raggedleft}
\renewcommand*{\partnumfont}{\normalfont\HUGE\sffamily\raggedleft}
\renewcommand*{\partnamefont}{\normalfont\HUGE\sffamily\raggedleft}
% this (without the \beforepartskip of the same form) force the part text higher onto the page.
\renewcommand{\afterpartskip}{\vspace*{\fill}}

\begin{document}

\chapterstyle{ell}
\part{A lot of Foo}
\chapter{Foo}

Foo stuff.

\chapter{Bar}

Bar stuff.

\end{document}

This changes the font to match, and switches from roman numerals, and puts in the ell shaped divider. However, in an ell chapterstyle the description is inline with the L shaped graphic, and I'm not sure how to manage forcing those to not be disjoint. Here's what I get for my ell like part style

modified memoir part style attempting to match ell chapterstyle

compared to the ell chapterstyle format

ell chapterstyle

The ell chapterstyle in memoir.cls is:

\makechapterstyle{ell}{%
  \chapterstyle{default}
  \renewcommand*{\chapnumfont}{\normalfont\HUGE\sffamily}
  \renewcommand*{\chaptitlefont}{\normalfont\huge\sffamily}
  \settowidth{\chapindent}{\chapnumfont 111}
  \renewcommand*{\chapterheadstart}{\begingroup
    \vspace*{\beforechapskip}%
    \begin{adjustwidth}{}{-\chapindent}%
    \hrulefill
    \smash{\rule{0.4pt}{15mm}}
    \end{adjustwidth}\endgroup}
  \renewcommand*{\printchaptername}{}
  \renewcommand*{\chapternamenum}{}
  \renewcommand*{\printchapternum}{%
    \begin{adjustwidth}{}{-\chapindent}
    \hfill
    \raisebox{10mm}[0pt][0pt]{\chapnumfont \thechapter}%
                              \hspace*{1em}
    \end{adjustwidth}\vspace*{-3.0\onelineskip}}
  \renewcommand*{\printchaptertitle}[1]{%
    \vskip\onelineskip
    \raggedleft {\chaptitlefont ##1}\par\nobreak}}

Notice that I've used the body of \chapterheadstart in my modified part. I'm not sure what part of this style results in the \chapterheadstart being inline with the chapter number.

Best Answer

Mine is a little more complicated than Harish', and will need a little tweeking from your part

\documentclass[openany,oneside]{memoir}

\chapterstyle{ell}

\renewcommand{\beforepartskip}{%
  \null
  \vspace*{\beforechapskip}
  \vspace*{\onelineskip}
  }
\renewcommand{\midpartskip}{\begingroup
  % \vspace*{\beforechapskip}%
  \begin{adjustwidth}{}{-\chapindent}%
  \hrulefill
  \smash{\rule{0.4pt}{15mm}}
  \end{adjustwidth}\endgroup}

% numeric instead of roman numeral for the part num:
\renewcommand*{\thepart}{\arabic{part}}
% ell like Fonts:
%
\renewcommand*{\parttitlefont}{\normalfont\huge\sffamily\raggedleft}
\renewcommand*{\partnumfont}{\normalfont\HUGE\sffamily\raggedleft}
\renewcommand*{\partnamefont}{\normalfont\HUGE\sffamily\raggedleft}
% this (without the \beforepartskip of the same form) force the part text higher onto the page.
\renewcommand{\afterpartskip}{\vspace*{\fill}}
\renewcommand\printpartnum{}
\renewcommand{\partnamenum}{}
\renewcommand\printpartname{%
  \begin{adjustwidth}{}{-\chapindent}
  \hfill
  \raisebox{11mm}[0pt][0pt]{\partnamefont\partname~\thepart}%
  \hspace*{1em}
  \end{adjustwidth}\vspace*{-3.0\onelineskip}}

\begin{document}

\chapterstyle{ell}
\part{A lot of Foo}
\chapter{Foo}

Foo stuff.

\chapter{Bar}

Bar stuff.

\end{document}
Related Question