3

I'm using the chapterstyle article in my document. However I want to customize the style, i.e., make my own style. Is there any way to find out the exact font size, spacings above and below etc. that the chapterstyle article uses?

1 Answer 1

2

The definition of the article chapter style is

\makechapterstyle{article}{%
  \chapterstyle{default}
  \setlength{\beforechapskip}{3.5ex \@plus 1ex \@minus .2ex}
  \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
  \setlength{\afterchapskip}{2.3ex \@plus .2ex}
  \renewcommand{\printchaptername}{}
  \renewcommand{\chapternamenum}{}
  \renewcommand{\chaptitlefont}{\normalfont\Large\bfseries}
  \renewcommand{\chapnumfont}{\chaptitlefont}
  \renewcommand{\printchapternum}{\chapnumfont \thechapter\quad}
  \renewcommand{\afterchapternum}{}}

It starts by loading the default chapter style as a basis and then modifies it.

The \beforechapskip parameter is set to 3.5ex with some stretching and shrinking. The \chapterheadstart hook is redefined to just do a vertical skip. Then \afterchapskip is set (the space below the title).

The hooks \printchaptername and \chapternamenum are redefined to do nothing (in the default style they would print “Chapter 1”).

The \chaptitlefont hook is redefined to choose \Large size and bold face. The \chapnumfont is set to equal \chaptitlefont.

The \printchapternum hook is redefined to use the font just chosen for printing the chapter number followed by a quad of space. After the chapter number nothing is done.

In my opinion, the spacing before and after the chapter title block should be rigid, so I'd prefer something like

\makechapterstyle{myarticle}{%
  \chapterstyle{default}
  \setlength{\beforechapskip}{3.5ex}
  \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
  \setlength{\afterchapskip}{2.3ex}
  \renewcommand{\printchaptername}{}
  \renewcommand{\chapternamenum}{}
  \renewcommand{\chaptitlefont}{\normalfont\Large\bfseries}
  \renewcommand{\chapnumfont}{\chaptitlefont}
  \renewcommand{\printchapternum}{\chapnumfont \thechapter\quad}
  \renewcommand{\afterchapternum}{}}

which ensures the titles will always be at the same position for all chapters.

The ex dimension depends on the font which is current at the moment the skip is inserted; 1ex is roughly the height of an x.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .