[Tex/LaTex] Decrease space before and after chapter in fncychap

chaptersfncychapsectioningspacing

I would like to decrease the space before and after the chapter name due to space constraints. I am using the fncychap. Here is the MWE:

\documentclass{report}
\usepackage[Glenn]{fncychap}
\usepackage{lipsum} % filler text

\begin{document}
    \chapter{Amazing}
    \lipsum[1-5] % filler text
\end{document}

Best Answer

The quickest way is to patch the appropriate commands. To change the spacing before the titles, you need to patch \@makechapterhead (for numbered chapters) and \@makeschapterhead (for unnumbered chapters); to change the spacing after the tiles, you need to patch \DOTI (for numbered chapters) and \DOTIS (for unnumbered chapters). A little example (the second argument for \patchcmd contains the default values; the third argument, the modified values):

\documentclass{report}
\usepackage[Glenn]{fncychap}
\usepackage{lipsum} % filler text
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{\vspace*{-20\p@}}{}{}
\patchcmd{\@makeschapterhead}{\vspace*{50\p@}}{\vspace*{-20\p@}}{}{}
\patchcmd{\DOTI}{\vskip 80\p@}{\vskip 40\p@}{}{}
\patchcmd{\DOTIS}{\vskip 40\p@}{\vskip 0\p@}{}{}
\makeatother

\begin{document}
    \chapter{Amazing}
    \lipsum[1-5] % filler text
\end{document}

enter image description here

However, I would suggest you not to use this style; long titles won't look good, You could consider using a framed title built with the help of the titlesec package; here's a simple example (the vertical spacing before and after the title is set using the second and third arguments for \titlespacing*):

\documentclass{report}
\usepackage{titlesec}
\usepackage{lipsum} % filler text

\makeatletter
\titleformat{\chapter}[frame]
  {\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
  {8pt}{\LARGE\bfseries\filcenter}
\titlespacing*{\chapter}
  {0pt}{0pt}{20pt}

\makeatother

\begin{document}
    \chapter{Amazing}
    \lipsum[1-5] % filler text
\end{document}

enter image description here

Related Question