4

enter image description here

Hello, I want something like the represented in the picture (using the book class), i.e., for the title of the chapter, I want "Chapter X" above and "Chapter Title" below, with a small font (in the book class the default font size is \HUGE, and I want it small like in the picture) and with a space between; for the subsection, something a bit smaller than the title, with the pattern
"1. Subsection Title" (in the book class the default is "1.1. Subsection Title" and the size is also \HUGE).
Don't know if I was clear enough, because I found it hard to explain, since this design is simple (but effective), and I can't replicate it using the titlesec package.
Any help is appreciated!

1
  • With titlesec , use \titleformat{\chapter}[display]{…}, and fill in the details of the parameters for your exact layout.
    – Bernard
    Commented Mar 7, 2021 at 10:03

1 Answer 1

3

Without knowing what sizes and spaces you want exactly, I could only guess, but using this as a starting point, you should be able to adjust the design to your liking:

\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{titlesec,blindtext}

% For the chapter format
\titleformat{\chapter}[display]%
    {\centering\Large\bfseries}% format of chapter
    {\normalsize\normalfont\MakeUppercase{\chaptertitlename}\enskip\thechapter}% format of the label
    {.5\baselineskip}{} % space between the two
\titlespacing*{\chapter}{0pt}{25pt}{\baselineskip} % spaces around \chapter{}, {left}{before}{after}

% For the section format
\renewcommand{\thesection}{\arabic{section}}% to get rid of the chapter number
\titleformat{\section}%
    {\centering\large\bfseries}% format of section
    {\thesection.}{.5em}{}
%\titlespacing*{\section}{0pt}{beforesep}{aftersep} % If you want to change the spacing around \section{} too

\begin{document}
    \chapter{Some Chapter}
    \section{Some Section}
    \blindtext
\end{document}

enter image description here

1
  • Thank you very much, shekura, it was really helpful! Commented Mar 10, 2021 at 2:27

You must log in to answer this question.

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