1

I'm attempting to replicate a particular Word template format used in my workplace in LaTeX (extbook class) but am having trouble replicating the desired Chapter and Section heading formats, shown in the attached image.

The Chapter title should consist, on separate lines, of:

  • Document title
  • Part X, Chapter Y
  • Chapter title
  • A line of custom text

All bold and size 14pt.

And the section headers should have:

  • Indentation with square symbol as shown
  • Section X (12pt font size)
  • Section title (9pt)

So far, I've used titlesec as follows to get 14pt font size on the Chapter title, and 9pt for the Section title (but haven't managed the 12pt for the "Section X" line.

\usepackage{titlesec}
\titleformat{\chapter}
    {\fontsize{14pt}{14pt}}

\titleformat{\section}  
  {\fontsize{9pt}{9pt}\bfseries} 
  {\thesection} 
  {1em} 

Is this kind of formatting possible with titlesec, or are there alternatives I should try? I've already got Arial font via fontspec.

Thank you for your suggestions and help.

Example of desired Chapter and section heading format

1 Answer 1

1

This might be a start

\documentclass{book}

\title{My Title}

\usepackage{titlesec}

\makeatletter
\titleformat{\chapter}[display]%
   {\fontsize\@xivpt\@xviipt\bfseries}
   {\@title\\\partname\ \thepart, \chaptertitlename\ \thechapter}
   {\z@}{}[{[Some custom text in square brackets]}]

\titleformat{\section}[display]%
   {\fontsize\@xiipt\@xiipt\itshape}
   {\makebox[2em][l]{\rule[2pt]{5pt}{5pt}}Section \thesection}
   {\z@}{\hspace{2em}\fontsize{9pt}\@xipt\upshape\bfseries}
\makeatother
\renewcommand*{\thesection}{\arabic{section}}

\begin{document}
\part{bla}
\chapter{foo}
\section{Meeh}

\end{document}

enter image description here

1
  • Thank you, this works very well.
    – Bells12
    Nov 21, 2023 at 15:45

You must log in to answer this question.

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