I'm trying to make a chapter header style to mimic the image as follows:
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.
\documentclass{book}
\usepackage{titlesec, blindtext, color}
\usepackage{titlesec}
\titleformat{\chapter}{\Huge}{\Large CHAPTER \Huge\thechapter\newline}{0pt}{\Huge}
\begin{document}
\chapter{Turing Machines}
\end{document}
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
.
Best Answer
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: