11

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?

3
  • I would recommend the tag headings here. Commented Aug 22, 2010 at 12:31
  • Done. Do you specifically want small numbers inside the big number, or just shading?
    – Caramdir
    Commented Aug 22, 2010 at 12:42
  • @Caramdir: No, this was only supposed to be ASCII-art. A big number would be sufficient. I am changing this... Commented Aug 22, 2010 at 13:33

3 Answers 3

17

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.

2
  • +1 Thank you, this is exactly what I was looking for. Furthermore, your comments are very helpful. Commented Aug 23, 2010 at 7:22
  • I think Gray should be gray.
    – Jost
    Commented Jul 8, 2015 at 12:47
4

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

0
3

...or the quotchap package.

0

You must log in to answer this question.

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