# Put chapter title in the middle of a page (vertically)

I'm using fncychap package to customize my chapters' titles. I want to put the chapter title in the center of a separate page (vertically).

\documentclass{report}
\usepackage[Bjornstrup]{fncychap}
\begin{document}
\chapter{Bjornstrup}%how to put it in the center of the page
\newpage
somecontent....
\end{document}


## 2 Answers

Use the macro \chaptervc to start your chapters. As you can see, it takes only one argument, just like the regular \chapter command.

It works by putting the original \chapter command output at vertical center, by using two \vfills, one before, one after. Then it uses a \clearpage to get a new page, since you wanted to have your chapter title in an independent page. (Though a \newpage should also be good here, since it is very unlikely to remain any unprocessed floats at this point.)

\documentclass{report}
\usepackage[Bjornstrup]{fncychap}
\usepackage{lipsum}

\long\def\chaptervc#1{\vfill\chapter{#1}\vfill\clearpage}

\begin{document}
\chaptervc{Bjornstrup}%how to put it in the center of the page

\lipsum[1]

\chaptervc{Another Chapter}

\lipsum[2]
\lipsum[3]
\lipsum[4]

\chaptervc{And Another}

\lipsum[5]

\end{document}


Adding \vfill before and after \chapter{#1} seems to do nothing to move the chapter heading down to the middle of the page. MMA's answer looks the same with or without them. The problem is that \chapter issues a \clearpage and the first \vfill ends up at the bottom of the previous page. Also, defining \chaptervc without an optional argument and without a star form limits its use.

One has to get inside the \chapter command's definition and put something before and after the start of the chapter heading. In the fncychap package, the chapter heading is started by the \DOCH command and finished off by either \DOTI or \DOTIS. In the following, I add \vfil vertical space before \DOCH and a \clearpage after \DOTI and \DOTIS. Also added are negative spaces cancel the positive space added elsewhere. No \vfil is placed after \DOTI because there is a \vfil contained inside \clearpage:

\documentclass{report}
\usepackage[Bjornstrup]{fncychap}
\usepackage{lipsum}
% internal changes to chapter headings:
\let\oldDOCH\DOCH
\let\oldDOTI\DOTI
\let\oldDOTIS\DOTIS
\renewcommand\DOCH{\vspace{-50pt}\vfil\oldDOCH}
\renewcommand\DOTI [1]{\oldDOTI {#1}\vspace{-40pt}\clearpage}
\renewcommand\DOTIS[1]{\oldDOTIS{#1}\vspace{-40pt}\clearpage}

\begin{document}
\chapter{Bjornstrup}

\lipsum[1]

\chapter{Another Chapter}

\lipsum[2]
\lipsum[3]
\lipsum[4]

\chapter{And Another}

\lipsum[5]

\end{document}