2

In my document, one of my chapter title lasts more than one line, so I want to increase the space between its lines. To do this, I used \linespread{1.8}\selectfont in the code below, but by using that, the space between "Chapter #" and the Chapter Heading increases, too. How can I avoid this latter undesired space? By the way, I'd prefer not to use additional packages like titlesec or setspace.

\documentclass{book}
\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
      \fi
    \fi
    \interlinepenalty\@M
    \Huge \bfseries \linespread{2}\selectfont #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother
\begin{document}
\chapter{Chapter Heading which is very very very long}
Some text ...
‎\end{document}‎
4

It doesn't! In your code you have a vskip20\p@ and this remains constant. (See the below minimal, where I zeroed it.

\documentclass{book}
\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
        \huge\bfseries \@chapapp\space \fbox{\thechapter}
        \par\nobreak
        \vskip 0\p@
      \fi
    \fi
    \interlinepenalty\@M
    \fbox{\parbox{\textwidth}{\Huge \bfseries \linespread{1.2}\selectfont #1\par\nobreak}}
    \vskip 40\p@
  }}
\makeatother
\begin{document}
\chapter{Chapter Heading which is very very Hery long}
Some text ...
‎\end{document}‎

enter image description here

Also don't forget to modify the star version of the command using \@makeschapterhead

2
  • So I should use \parbox command to control the scope of \linespread{1.2}\selectfont, right? Feb 16 '13 at 20:43
  • 1
    @VahidDamanafshan It is easier to adjust with a negative skip to suit e.g.\vskip-30pt on line 10. Feb 16 '13 at 20:50

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.