1

I want to set the leading for chapter titles with fontspec and titlesec. Unfortunately, the first line has bigger leading than the others and I dont't know how to fix it. I read about the problem, there was suggested to end the paragraph after the chapter title. But I could not do that with titlesec. A minimal example follows:

\documentclass{book}

\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{fontspec}

\newfontfamily\headerfont{Georgia}
\titleformat{\chapter}{\raggedright\fontsize{40}{30}\headerfont}{}{0pt}{\uppercase}

\begin{document}
\chapter{A long chapter title with multiple lines}
\blindtext
\end{document}

enter image description here

2

You're asking a baseline skip of 30pt with a font size of 40pt and this is the cause for the squeezed lines. Use a larger baseline skip:

\documentclass{book}

\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{fontspec}

\newfontfamily\headerfont{Georgia}

\titleformat{\chapter}
  {\raggedright\fontsize{40}{50}\headerfont}
  {}
  {0pt}
  {\MakeUppercase}

\begin{document}

\chapter{A long chapter title with multiple lines}

\blindtext

\end{document}

Avoid \uppercase and prefer \MakeUppercase.

enter image description here

If you want that reduced leading (I can't see any valid reason for it):

\documentclass{book}

\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{fontspec}

\newfontfamily\headerfont{Georgia}
\titleformat{\chapter}
  {\linespread{0}\raggedright\fontsize{40}{0}\headerfont}
  {}
  {0pt}
  {\MakeUppercase}

\begin{document}
\chapter{A long chapter title with multiple lines}
\blindtext
\end{document}

The output is here (I labeled the edit as horribile visu).

enter image description here

  • But I want it that small – Eman Resu Jun 12 '17 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.