0

Im trying this code for a pretty chapter title: (http://texnorte.blogspot.com/2012/06/styling-my-sectionchapter.html), however I cannot get the chapter title on the line instead of next to it. It should be on the right of the page, as in the link. Can someone please help me :)

\titleformat{\chapter}[display]
  {\normalfont\scshape\Huge}
  {\hspace*{-70pt}\thechapter.~}
  {-15pt}
  {\hspace*{-110pt}\rule{\dimexpr\textwidth+80pt\relax}{3pt}\Huge}
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\scshape\Huge}
  {\hspace*{-70pt}}
  {-15pt}
  {\hspace*{-110pt}\rule{\dimexpr\textwidth+80pt\relax}{3pt}\Huge}
\titlespacing*{\chapter}{0pt}{0pt}{30pt}

enter image description here

Katie
  • 143
  • 3

1 Answers1

1

Not sure I've well understood what you want, but I propose some like this (with the default hang style ):

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{erewhon}
\usepackage[svgnames]{xcolor}

\usepackage{titlesec}

\titleformat{\chapter}
  {\normalfont\scshape\Huge}
  {\hspace*{-70pt}\thechapter.~}
  {15pt}
  {\Huge}[\vskip -1.5ex\hspace*{-110pt}\color{IndianRed}\rule{\dimexpr\textwidth+80pt\relax}{3pt}]
\titleformat{name=\chapter,numberless}
  {\normalfont\scshape\Huge}
  {\hspace*{-70pt}}
  {-15pt}
  {\Huge}[\vskip -1.5ex\hspace*{-110pt}\color{IndianRed}\rule{\dimexpr\textwidth+80pt\relax}{3pt}]
\titlespacing*{\chapter}{0pt}{0pt}{30pt}

\begin{document}

\chapter{Method}

\chapter*{References}

\end{document} 

enter image description here

Bernard
  • 271,350