\documentclass[10pt,twoside]{memoir} \usepackage{layouts}[2001/04/29] \usepackage{palatino} \usepackage{color,calc} \newsavebox{\ChpNumBox} \definecolor{ChapBlue}{rgb}{0.00,0.65,0.65} \makeatletter \newcommand*{\thickhrulefill}{% \leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@} \newcommand*\BuildChpNum[2]{% \begin{tabular}[t]{@{}c@{}} \makebox[0pt][c]{#1\strut} \\[.5ex] \colorbox{ChapBlue}{% \rule[-10em]{0pt}{0pt}% \rule{1ex}{0pt}\color{black}#2\strut \rule{1ex}{0pt}}% \end{tabular}} \makechapterstyle{BlueBox}{% \renewcommand{\chapnamefont}{\large\scshape} \renewcommand{\chapnumfont}{\Huge\bfseries} \renewcommand{\chaptitlefont}{\raggedright\Huge\bfseries} \setlength{\beforechapskip}{20pt} \setlength{\midchapskip}{26pt} \setlength{\afterchapskip}{40pt} \renewcommand{\printchaptername}{} \renewcommand{\chapternamenum}{} \renewcommand{\printchapternum}{% \sbox{\ChpNumBox}{% \BuildChpNum{\chapnamefont\@chapapp}% {\chapnumfont\thechapter}}} \renewcommand{\printchapternonum}{% \sbox{\ChpNumBox}{% \BuildChpNum{\chapnamefont\vphantom{\@chapapp}}% {\chapnumfont\hphantom{\thechapter}}}} \renewcommand{\afterchapternum}{} \renewcommand{\printchaptertitle}[1]{% \usebox{\ChpNumBox}\hfill \parbox[t]{\hsize-\wd\ChpNumBox-1em}{% \vspace{\midchapskip}% \thickhrulefill\par \chaptitlefont ##1\par}}% } \chapterstyle{BlueBox} \setsecheadstyle{\sffamily\bfseries\Large} \setsubsecheadstyle{\sffamily\bfseries\normal} \makepagestyle{myruledpagestyle} \makeevenhead{myruledpagestyle}{\thepage}{}{\leftmark} \makeoddhead{myruledpagestyle}{\rightmark}{}{\thepage} \makeatletter \makepsmarks{myruledpagestyle}{ \def\chaptermark##1{\markboth{% \ifnum \value{secnumdepth} > -1 \if@mainmatter \chaptername\ \thechapter\ --- % \fi \fi ##1}{}} \def\sectionmark##1{\markright{% \ifnum \value{secnumdepth} > 0 \thesection. \ % \fi ##1}} } \makeatother \makerunningwidth{myruledpagestyle}{1.1\textwidth} \makeheadposition{myruledpagestyle}{flushright}{flushleft}{flushright}{flushleft} \makeheadrule{myruledpagestyle}{1.1\textwidth}{\normalrulethickness} \makeglossary \makeindex \def\mychapterstyle{BlueBox} \def\mypagestyle{myruledpagestyle} \def\revision{}