10

I am using the scrbook class and I would like to achieve the following effect for my chapter headings:

 ####   
#####   
  ###   
  ###   
 #####      Name of chapter

How would I do this best? Is it possible to do this by simply changing the preamble?

Caramdir
  • 89,023
  • 26
  • 255
  • 291

3 Answers3

16

Three packages have been already mentioned. Since KOMA-Script classes provide a lot of sophisticated features, I usually aim not to lose them. Though packages usually work fine also with KOMA classes, they might remove class features by redefining class commands. For instance, quotchap doesn't care about periods after chapter numbers, supported by KOMA options like numbers=enddot or the autoenddot mechanism.

So, my first question would be: how can I solve the problem using class features? Usually there's a good chance. In this case, I could redefine the macro \chapterformat which is responsible for printing the chapter number.

Code example:

\documentclass{scrbook} 
\usepackage{lmodern}
\renewcommand*{\chapterformat}{%
  \fontsize{80}{88}\selectfont\thechapter\autodot\enskip}
\begin{document}
\chapter{Name of chapter}
\end{document}

Output:

alt text

This way not only periods but also user defined chapter or sectioning fonts are still supported like done by

\setkomafont{sectioning}{\rmfamily\bfseries\color{Gray}}


Choosing the right way:

To sum up, I believe generally the right way would be

  1. Figure out if it may be done using class features by consulting the documentation.

  2. If not, look out for packages, for instance in the titles and sectioning category of the TeX Catalogue Online.

  3. If neither a class feature nor a package could solve it, then consider to program it yourself. Check out the corresponding macros within the class source file, take them as a starting point, be careful to preserve their other features you don't wish to change.

suvayu
  • 789
Stefan Kottwitz
  • 231,401
4

That looks like a job for the fncychap or titlesec packages.

Rob Hyndman
  • 4,664
  • 4
  • 24
  • 23
3

...or the quotchap package.

Grigory M
  • 4,984
  • 4
  • 39
  • 37