I'm reading a document created with TeX, and it has rather nice chapter headings. Does anyone know how this was done? Fancy Chapter Headings


Ok, I've got quite far using TikZ, the only thing I haven't got is the number extending into the margin:


{\hfill \tikz[remember picture] \node[] (nr) {\fontsize{20}{70}\selectfont\color{black}\textsc{Chapter~~} \fontsize{60}{70}\selectfont\color{black}\thechapter};
\begin{tikzpicture}[overlay,remember picture]
\coordinate (rightborder) at ($(nr)+(100,0)$);
\coordinate (right) at ($(nr.east) + (0.5,0)$);
\draw[line width=4.5em] (right) -- (rightborder);

It's the Veelo chapterstyle from the memoir class.

  • Well spotted! Thanks Martin, but this is still technically the correct answer. – fredley Mar 26 '11 at 17:44

You can create this effect using a \rlap{} box in a ragged-left chapter line. The huge number could be zoomed using graphics and the black box can be simply created using \rule.

You can use the titlesec package to adjust the \chapter style to use this code (I adapted Stefan Kottwitz's solution of Center aligning chapters).


    \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}



The rule width of 5cm is just a guess. You could calculate the exact value but simply using a large enough value works as well. Any overhang over the page is not shown anyway.


  • I've used this, with a ~ after Chapter and another after the numeral for a slightly nicer layout. Otherwise great, thank you very much! – fredley Mar 26 '11 at 16:59
  • Thanks so much for this nice solution, however I have problem with this one if the margin is mall and the chapter numbers are having two digits. Is there a way establish consitency also in these cases? – bonanza Feb 6 '19 at 12:51
  • 1
    @bonanza: (1) You could move the "CHAPTER" text to the left to leave more space for the number and the rule. For this add \hspace{2cm} after \rlap{...}. However, this makes the number be misaligned with the margin, which might not look good. (2) Alternatively, keep the number in the normal text area and only put the rule into the margin. For this simply move ` \resizebox{!}{1.5cm}{\thechapter}` from inside \rlap{..} to infront of it. – Martin Scharrer Feb 6 '19 at 13:02
  • Dear martin, How can I remove the chapter before the chapter number? I did \renewcommand{\chaptername}{\hfill} for now – Boltzee May 7 '20 at 1:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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