Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am preparing a book in memoir class. I use \chapterstyle{madsen}, which uses a sans serif font (I don't know which one). I also have parts and I would like to have the parts to be typeset in the madsen style as well (if I can get the font to be the same, I would be satisfied).

Second, if I can get the section titles to be in the same font, it would be great. Any suggestions would be very much appreciated.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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}
share|improve this answer
    
Wonderful. Thanks very much for your assistance. –  ozsu Nov 16 '12 at 13:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.