1

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

My desired outcome

Could anyone give a possible way to achieve this?

  • 1
    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. – user26732 Dec 2 '16 at 13:38
3

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.

Also see, Hansen-like chapter heading and How to best set chapter title color in the memoir class's Hansen style?

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:ftp://ftp.dante.de/tex-archive/info/MemoirChapStyles/MemoirChapStyles.pdf

| improve this answer | |
  • 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? – Raaja_is_at_topanswers.xyz Dec 2 '16 at 15:35
  • You're using memoir? Post a MWE. – user26732 Dec 2 '16 at 16:01
  • I got it working :) Thanks for your help!! and I am using book class. – Raaja_is_at_topanswers.xyz Dec 2 '16 at 16:04
  • 1
    I guess you're lucky; it's supposed to be used with the Memoir class. – user26732 Dec 2 '16 at 16:11
  • may be I am !! :D – Raaja_is_at_topanswers.xyz Dec 2 '16 at 16:14

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.