18

As fncychap has no such chapter style, and using the memoir class will cause a lot conflicts with my current settings (book class), how to make this style (perhaps using the titlesec package)?

  1. title style for table of contetns, Nomenclature, References, etc
  2. title style for chapters

enter image description here

9

1 Answer 1

26

One option using TikZ (a TikZ-free solution is provided below); adjust the font attributes and lengths according to your needs:

\documentclass{book}
\usepackage{lmodern}
\usepackage{titlesec}
\usepackage{microtype}
\usepackage{tikz}

\definecolor{myblue}{RGB}{0,82,155}

\titleformat{\chapter}[display]
  {\normalfont\bfseries\color{myblue}}
  {\filleft%
    \begin{tikzpicture}
    \node[
      outer sep=0pt,
      text width=2.5cm,
      minimum height=3cm,
      fill=myblue,
      font=\color{white}\fontsize{80}{90}\selectfont,
      align=center
      ] (num) {\thechapter};
    \node[
      rotate=90,
      anchor=south,
      font=\color{black}\Large\normalfont
      ] at ([xshift=-5pt]num.west) {\textls[180]{\textsc{\chaptertitlename}}};  
    \end{tikzpicture}%
  }
  {10pt}
  {\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE\sffamily}

\begin{document}

\tableofcontents
\chapter{Betratronic motion in a synchrotron}

\end{document}

An unnumbered chapter:

enter image description here

A numbered chapter:

enter image description here

A TikZ-free option:

\documentclass{book}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{titlesec}
\usepackage{microtype}

\definecolor{myblue}{RGB}{0,82,155}

\titleformat{\chapter}[display]
  {\normalfont\bfseries\color{myblue}}
  {\filleft\hspace*{-60pt}%
    \rotatebox[origin=c]{90}{%
      \normalfont\color{black}\Large%
        \textls[180]{\textsc{\chaptertitlename}}%
    }\hspace{10pt}%
    {\setlength\fboxsep{0pt}%
    \colorbox{myblue}{\parbox[c][3cm][c]{2.5cm}{%
      \centering\color{white}\fontsize{80}{90}\selectfont\thechapter}%
    }}%
  }
  {10pt}
  {\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE\sffamily}

\begin{document}

\tableofcontents
\chapter{Betratronic motion in a synchrotron}

\end{document}

An unnumbered chapter:

enter image description here

A numbered chapter:

enter image description here

Some remarks:

  • The titlesec package was used to easily change the formatting for chapter headings.

  • The microtype package was used to use \textls to space out the letters in "Chapter".

  • The lmodern package was used just to have access to a 80pt font size.

  • I used TikZ in the first solution to quickly place some of the elements; the second option is a TikZ-free solution.

3
  • @KOF You're welcome! Glad I could help. Apr 3, 2014 at 21:05
  • What's the reason for not wanting to use TikZ?
    – Holene
    Apr 5, 2014 at 15:55
  • 3
    @Holene my first answer was the one using TikZ :) (and I am an admirer of TikZ); I included a TikZ-free possibility since I think this is one of the cases in which using TikZ for such a simple task might be an overkill; TikZ is such a heavy package and consuming resources for simple tasks is not really needed. Apr 5, 2014 at 18:09

You must log in to answer this question.

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