# [Tex/LaTex] How to change the chapter header font/layout

fontssectioning

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.

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:

\documentclass{scrbook}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{xcolor}
\colorlet{chapter}{cyan}

\makeatletter
\renewcommand*{\chapterformat}{
\begingroup
\setlength{\unitlength}{1mm}
\begin{picture}(40,30)(0,5)
\setlength{\fboxsep}{0pt}
\put(0,15){\line(1,0){\dimexpr
\textwidth-1\unitlength\relax\@gobble}}
\put(40,15){\makebox(\dimexpr
\textwidth-20\unitlength\relax\@gobble,\ht\strutbox\@gobble)[l]{
\ \normalsize\color{cyan}\chapapp~\thechapter\autodot
}}
\end{picture}
\endgroup
}
\makeatother

\begin{document}
\chapter{Alan Turing}
\end{document}