0

I'm using a template in TexStudio which has a defined set of fancyhdr rules. But I wants to change the layout of chapter header: make the chap.1 on the left and to put the chapter title onto the right side (see the attached image).

Is there any way I an overrule the defined settings? Because it's very long declarations under fancyhdr.sty file and I'm not sure which part to alter. Header layout

11
  • 3
    Yes, there is a way to do this.
    – cfr
    Sep 29, 2016 at 0:11
  • However, it almost certainly has nothing to do with fancyhdr which concerns only headers and footers, neither of which are shown in the image you posted.
    – cfr
    Sep 29, 2016 at 0:12
  • 1
    You can use titlesec to do that.
    – Bernard
    Sep 29, 2016 at 0:18
  • Cool! That's great. I thought I have to alter the fancyhdr. I will do it by titlesec. Thanks @Bernard
    – Yousaf
    Sep 29, 2016 at 0:34
  • 1
    Sorry, I messed up filleft for the 2nd line and filright for the 1st line. I've posted an answer to show how to proceed. Hope this is more or less what you want.
    – Bernard
    Oct 3, 2016 at 0:31

1 Answer 1

2

Here is a way to to do it with titlesec. The * in \titlespacing suppresses indentation at the beginning of the chapter.

\documentclass{book}
\usepackage{titlesec, graphicx, geometry, titlecaps}

%Chapter Headers%
\titleformat{\chapter}[display]{}{\normalfont\Large\scshape\titlecap{\chaptertitlename}\enspace\scalebox{1.8}{\thechapter}\filright} {8ex}{\Huge\bfseries\sffamily\filleft}[{\titlerule[1pt]}]
\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\begin{document}

\chapter{Introduction}

\end{document} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .