0

enter image description here

I would like to format this chapter title for my report. I am not sure how to create it thus, I was wondering if someone here can help me out.

1 Answer 1

1

With the help of the titlesec package:

enter image description here

\documentclass{report}
\usepackage{lipsum} % For dummy text using the \lipsum command. Do not use in real document.
\usepackage{titlesec}

\titleformat{\chapter}[display]
  {\LARGE\raggedleft\bfseries}
  {\titlerule \vspace{5pt}\Large\normalfont\textsc{\chaptertitlename}~\thechapter}
  {5pt}
  {\titlerule \vspace{5pt}} 
  
\begin{document}
\chapter{Introduction}
\lipsum
\end{document}
6
  • Will the above work if I use scrbook instead?
    – user238811
    Apr 5, 2021 at 8:38
  • @Thomas: Yes, it will. It is not tied to the documentclass. I have established that by simply changing the documentclass in the sample code. I suggest you try the same, to see if it works for your particular use case, which is not always certain in LaTeX.
    – Markus G.
    Apr 5, 2021 at 8:42
  • I tried and got an error that reads "! Missing number, treated as zero.". I am using XeLaTeX to compile since I am also using unicode-math as a package.
    – user238811
    Apr 5, 2021 at 8:44
  • 1
    @Thomas: Although, you are technically right asking this, because titlesec is not actually recommended with KOMA-classes. But then again, that information was not in your intial question. If you want an answer compatible with scrreport and not the traditional report I suggest editing your question to include this important information.
    – Markus G.
    Apr 5, 2021 at 8:46
  • @Thomas: The KOMA script classes offer their own way of customizing, so it might be better to use KOMA scripts' interface than titlesec.
    – leandriis
    Apr 5, 2021 at 8:46

You must log in to answer this question.