4

Possible Duplicate:
Title between lines

Can anybody please tell me how to get horizontal lines above and under the \chapter{MyChapter}? Here is an example:

enter image description here

marked as duplicate by cmhughes, lockstep, barbara beeton, Martin Schröder, Werner Jan 16 '13 at 4:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

8

Here's a possible solution using the titlesec package:

\documentclass{book} 
\usepackage{titlesec}

\titleformat{\chapter}[display]
  {\bfseries\huge}
  {\filleft\Large\chaptertitlename~\thechapter}
  {3ex}
  {\titlerule\vspace{1.5ex}\filright}
  [\vspace{1ex}\titlerule]

\begin{document}

\chapter*{Test Unnumbered Chapter}
\chapter{Test Numbered Chapter}

\end{document}

An image of the unnumbered chapter:

enter image description here

and an image of the numbered chapter:

enter image description here

  • Thank you. It looks amazing. thumbs up and have a nice day. =) – user24403 Jan 15 '13 at 10:35
  • 1
    How can I solve this without using the titlesec-package (because of using scrbook-class)? – Dave Jul 11 '15 at 10:21
  • @Dave Please, feel free to open a fresh new question. – Gonzalo Medina Jul 11 '15 at 14:01
  • 1
    Well fine, how to manage the same for the list of contents and list of tables? Moreover, how to apply the above mentioned stuffs while writing a thesis using report class and including chapters. – Mishra S Sep 8 '17 at 10:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.