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 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?

share|improve this question
    
I would recommend the tag headings here. –  Bran the Blessed Aug 22 '10 at 12:31
    
Done. Do you specifically want small numbers inside the big number, or just shading? –  Caramdir Aug 22 '10 at 12:42
    
@Caramdir: No, this was only supposed to be ASCII-art. A big number would be sufficient. I am changing this... –  Bran the Blessed Aug 22 '10 at 13:33
add comment

3 Answers

up vote 11 down vote accepted

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.

share|improve this answer
    
+1 Thank you, this is exactly what I was looking for. Furthermore, your comments are very helpful. –  Bran the Blessed Aug 23 '10 at 7:22
add comment

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

share|improve this answer
    
+1 This is also quite interesting, thanks. –  Bran the Blessed Aug 23 '10 at 7:23
add comment

...or the quotchap package.

share|improve this answer
    
+1 I like this one, as well. –  Bran the Blessed Aug 23 '10 at 7:23
add comment

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.