18.11.12

memoir class \part style


Here's the definition of the madsen chapter style:
\makechapterstyle{madsen}{% requires graphicx package
  \chapterstyle{default}
  \renewcommand*{\chapnamefont}{%
    \normalfont\Large\scshape\raggedleft}
  \renewcommand*{\chaptitlefont}{%
    \normalfont\Huge\bfseries\sffamily\raggedleft}
  \renewcommand*{\chapternamenum}{}
  \renewcommand*{\printchapternum}{%
    \makebox[0pt][l]{\hspace{0.4em}%
      \resizebox{!}{4ex}{%
        \chapnamefont\bfseries\sffamily\thechapter}%
    }%
  }%
  \renewcommand*{\printchapternonum}{%
    \chapnamefont \phantom{\printchaptername \chapternamenum%
      \makebox[0pt][l]{\hspace{0.4em}%
        \resizebox{!}{4ex}{%
          \chapnamefont\bfseries\sffamily 1}%
      }%
    }%
    \afterchapternum %
  }%
  \renewcommand*{\afterchapternum}{%
    \par\hspace{1.5cm}\hrule\vskip\midchapskip}}
The relevant parts are: \normalfont\Large\scshape for the font of the chapter name (i.e., the string "Chapter") and \normalfont\Huge\bfseries\sffamily for the chapter titles (the chapter numbers require other specifications that won't be used).
To obtain the same settings for part headings, you can redefine \partnamefont,\partnumfont, and \parttitle font to use similar settings; for section headings, you can use\setsecheadstyle. Here are the changes required:
\documentclass{memoir}
\usepackage{graphicx}
\chapterstyle{madsen}

\renewcommand\partnamefont{\normalfont\Large\scshape}
\renewcommand\partnumfont{\normalfont\Large\scshape}
\renewcommand\parttitlefont{\normalfont\Huge\bfseries\sffamily}
\setsecheadstyle{\normalfont\Large\bfseries\sffamily}

\begin{document}

\part{Test Part}
\chapter{Test Chapter One}
\section{Test Section}

\end{document}

No hay comentarios:

Publicar un comentario