# How to create specific chapter style in book documentclass

I am using the book documentclass for my thesis. The chapter titles are the normal ones but I would like to know is it is possible to change them to something more fancy, preferable without changing the documentclass.

In particular, I am interested to those chapter titles which, on the first page of every chapter, they have a solid black line on top (i.e., in the header), above which and flushed left is written "Chapter x" while, directly below that line and flushed right is the chapter name/title.

I have seen various theses written in this style although I cannot find which one it is.

I am aware of fncychap, memoir etc but the styles of those packages - at least the ones which I have seen - do not appeal to me.

If anyone is familiar with the style I described and knows a smooth way to do it within the documentclass book, I would be glad to know it.

If, for any reason whatsoever, this is incompatible with documentclass book, I would also like to know alternative solutions.

-

The titlesec package allows you to easily customize the headings for the sectional units; a little example:

\documentclass{book}
\usepackage{titlesec}
\usepackage{lipsum} % just to generate text for the example

\titleformat{\chapter}[display]
{\bfseries\Large}
{\filright\MakeUppercase{\chaptertitlename} \Huge\thechapter}
{1ex}
{\titlerule\vspace{1ex}\filleft}
[\vspace{1ex}\titlerule]

\begin{document}

\chapter{Test Unnumbered Chapter}
\lipsum[1-2]
\chapter{Test Numbered Chapter}
\lipsum[1-2]

\end{document}


-