1

I am using the titlesec package for formatting the chapter style (book class).

I follow this thread: How to add a line between chapter number and chapter title and get (almost) desired results.

enter image description here

The format I need is:

  • Normal font for the word "Chapter" and bold font for the chapter number (already got).
  • However I also need the bold font for the chapter name

My titlesec format:

\titleformat{\chapter}[display]
  {\normalfont\LARGE}
  {\chaptertitlename~\bfseries\HUGE\thechapter}{1pc}
  {{\color{black}\titlerule[1pt]}\vspace{1pt}\MakeUppercase}
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\bfseries\LARGE}{}{1pc}
  {\MakeUppercase}

May I ask how to get the desired result?

Also May I ask if there is a way to set precise font size (like 20pt, 24pt) for each element in the chapter title instead of using \large \huge?

2
  • 1
    normalfont and LARGE for Chapter -- bfseries and LARGE for chapter number -- is this the requirement -- just change the appropriate line of code --{\normalfont\LARGE\chaptertitlename~\bfseries\LARGE\thechapter}{1pc}
    – js bibra
    Commented Oct 1, 2021 at 7:16
  • 1
    for the chapter title in bold modify the code -- {{\color{brown}\titlerule[2pt]}\vspace{1pc}\MakeUppercase} as {{\color{brown}\titlerule[2pt]}\vspace{1pc}\bfseries\MakeUppercase}
    – js bibra
    Commented Oct 1, 2021 at 7:23

1 Answer 1

2

enter image description here

\documentclass{book}
\usepackage{titlesec, lipsum}
\usepackage{xcolor} 

\titleformat{\chapter}[display]
{}
{\normalfont\LARGE\chaptertitlename~\bfseries\LARGE\thechapter}{1pc}
{{\color{brown}\titlerule[2pt]}\vspace{1pc}\MakeUppercase}
\titleformat{name=\chapter,numberless}[display]
{\normalfont\bfseries\LARGE}{}{1pc}
{\MakeUppercase}

\begin{document}

    
\chapter{Test Chapter}
\lipsum[2]
\end{document}

AND for the chapter title in bold

\documentclass{book}
\usepackage{titlesec, lipsum}
\usepackage{xcolor} 

\titleformat{\chapter}[display]
{}
{\normalfont\LARGE\chaptertitlename~\bfseries\LARGE\thechapter}{1pc}
{{\color{brown}\titlerule[2pt]}\vspace{1pc}\bfseries\MakeUppercase}
\titleformat{name=\chapter,numberless}[display]
{}{}{1pc}
{}

\begin{document}

    
\chapter{Test Chapter}
\lipsum[2]
\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 .