# Typesetting chapter titles

I am writing my thesis and while reading an example report, I found this fancy kind of typesetting of chapter titles.

Could anyone give a possible way to achieve this?

• A chapter heading style like this is very similar to ones in the Koma classes or Memoir. Unfortunately I don't have the direct link, but the Memoir and the Koma manuals will point you in the right direction. Dec 2 '16 at 13:38

The Hansen chapter style in Memoir looks like this. I don't know if there is a similar version for the standard or Koma classes. Add the following code to your preamble.

Here is the source for the chapter style:

\documentclass[12pt]{memoir}
\usepackage[T1]{fontenc}
\usepackage{kpfonts}
\setSingleSpace{1.1}
\SingleSpacing
\usepackage{xcolor,calc}
\definecolor{chaptercolor}{gray}{0.8}
% helper macros
\newcommand\numlifter[1]{\raisebox{-2cm}[0pt][0pt]{\smash{#1}}}
\newcommand\numindent{\kern37pt}
\newlength\chaptertitleboxheight
\makechapterstyle{hansen}{
\renewcommand\printchaptername{\raggedleft}
\renewcommand\printchapternum{%
\begingroup%
\leavevmode%
\chapnumfont%
\strut%
\numlifter{\thechapter}%
\numindent%
\endgroup% }
\renewcommand*{\printchapternonum}{%
\vphantom{\begingroup%
\leavevmode%
\chapnumfont%
\numlifter{\vphantom{9}}%
\numindent%
\endgroup}
\afterchapternum}
\setlength\midchapskip{0pt}
\setlength\beforechapskip{0.5\baselineskip}
\setlength{\afterchapskip}{3\baselineskip}
\renewcommand\chapnumfont{%
\fontsize{4cm}{0cm}%
\bfseries%
\sffamily%
\color{chaptercolor}%
}
\renewcommand\chaptitlefont{%
\normalfont%
\huge%
\bfseries%
\raggedleft%
}%
\settototalheight\chaptertitleboxheight{%
\parbox{\textwidth}{\chaptitlefont \strut bg\\bg\strut}}
\renewcommand\printchaptertitle[1]{%
\parbox[t][\chaptertitleboxheight][t]{\textwidth}{%
%\microtypesetup{protrusion=false}% add this if you use microtype
\chaptitlefont\strut ##1\strut}%
} }
\chapterstyle{hansen}
\aliaspagestyle{chapter}{empty} % just to save some space
\begin{document}
\let\clearforchapter\par % cheating, but saves some space
\chapter{A chapter title}
Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
a mi.
\par\fancybreak{$***$}\par
\chapter*{A non-numbered chapter title}
Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
a mi.
\end{document}

Source is found at pg. 38 of Lars Marsden's manual:http://mirrors.ctan.org/info/latex-samples/MemoirChapStyles/MemoirChapStyles.pdf

• when I try to use \chapterstyle{hansen} in my preamble, I get an error as undefined as control sequence chapter style. +1 for your solution and I suppose your solution should work, but I am missing something. Do you have an idea? Dec 2 '16 at 15:35
• You're using memoir? Post a MWE. Dec 2 '16 at 16:01
• I got it working :) Thanks for your help!! and I am using book class. Dec 2 '16 at 16:04
• I guess you're lucky; it's supposed to be used with the Memoir class. Dec 2 '16 at 16:11
• may be I am !! :D Dec 2 '16 at 16:14