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'm trying to make a chapter header style to mimic the image as follows:

enter image description here

I've got the following code currently, but not sure how to get the line in the middle, and the title of the chapter to be below the chapter number.

\usepackage{titlesec, blindtext, color}

\titleformat{\chapter}{\Huge}{\Large CHAPTER \Huge\thechapter\newline}{0pt}{\Huge}

    \chapter{Turing Machines}

Also related to this task: I'd like to know if there's any way to selectively customize the font of a section header without having to change the default font of the whole document. I'm using pdflatex on Windows via MiKTeX, and one package I tried - I forget the name of it now, but I think it might have been fontspec - wouldn't work with pdflatex.

share|improve this question
fontspec only works with XeTeX and LuaTeX. –  Sašo Živanović Jan 29 '13 at 22:18

2 Answers 2

I have a little code that I took from a German website some times ago (I can not find it to reference sadly). With a little modification it is partially similar to what you are looking for. Maybe it can be a good starting point:



            \ \normalsize\color{cyan}\chapapp~\thechapter\autodot

    \chapter{Alan Turing}

enter image description here

share|improve this answer
It does indeed look similar, but one big difference is the fact that the line doesn't extend to the edge of the page; it only reaches the margins. I'll see if I can get it working though, since it is pretty close. –  agent154 Jan 30 '13 at 1:27
@agent154, You are right! I didn't pay attention to the line. But again, I thought it's close enough and can be a starting point. cheers. –  Pouya Jan 30 '13 at 8:54
up vote 0 down vote accepted

I ended up doing this through usage of tikz.

Ignore the text - that's a work in progress, as well as the formatting for it all. But I got the chapter header just how I wanted it, which after playing around turned out to be a bit different than the image above.

enter image description here


  {\begin{tikzpicture}[remember picture,overlay]
    \node[yshift=-3cm] at (current page.north west)
      {\begin{tikzpicture}[remember picture, overlay]
        \draw[fill=cyan] (0,-1) rectangle
              {\color{white}\LARGE CHAPTER \Huge\thechapter};


I'm using a custom made class file, so I only included what I think is the bare minimum to get the heading to show... it won't ultimately look exactly like in this image with the spacing and other text positioning.

share|improve this answer

Your Answer


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.