# modifying part style in memoir class to match ell chapterstyle

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}%
\hrulefill
\smash{\rule{0.4pt}{15mm}}

% numeric instead of roman numeral for the part num:
\renewcommand*{\thepart}{\arabic{part}}
% ell like Fonts:
%
% ragged left: from http://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

compared to the ell chapterstyle format

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}
\vspace*{\beforechapskip}%
\hrulefill
\smash{\rule{0.4pt}{15mm}}
\renewcommand*{\printchaptername}{}
\renewcommand*{\printchapternum}{%
\hfill
\raisebox{10mm}[0pt][0pt]{\chapnumfont \thechapter}%
\hspace*{1em}
\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.

-
Not quite sure what you want? Should it say Part I inside the L? –  daleif May 14 '12 at 13:34

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}%
\hrulefill
\smash{\rule{0.4pt}{15mm}}

% 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\printpartname{%
\hfill
\raisebox{11mm}[0pt][0pt]{\partnamefont\partname~\thepart}%
\hspace*{1em}

\begin{document}

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

Foo stuff.

\chapter{Bar}

Bar stuff.

\end{document}

-
What tweaking does this require? It matches the chapterstyle very well (even including the extra spacing of the chapter text). –  Peeter Joot May 14 '12 at 16:12
Vertical adjustment, it does not match exactly the placement used by the chapterstyle –  daleif May 15 '12 at 18:44

You can adjust the fill distances like:

\renewcommand{\midpartskip}{\begingroup
\vspace*{-.4\beforechapskip}
\hrulefill
\smash{\rule{0.4pt}{15mm}}


The complete code will be

\documentclass[openany]{memoir}

\chapterstyle{ell}

\renewcommand{\midpartskip}{\begingroup
\vspace*{-.4\beforechapskip}
\hrulefill
\smash{\rule{0.4pt}{15mm}}

% numeric instead of roman numeral for the part num:
\renewcommand*{\thepart}{\arabic{part}}
% ell like Fonts:
%
% ragged left: from http://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}


-