# How to minimize a space between a chapter title and a top page

I would minimize a space between a chapter title and a top of page. there is what i have(black line) and what i will do(red line).

A red line is a space wich i would to use instead of the space in the black line.

this is a code.

\documentclass{report}
\usepackage[Lenny]{fncychap}
\begin{document}
\chapter{Fancy title with Latex}
\end{document}

• Please state explicitly what you mean by "minimize a space between a chapter title and a top of page". Do you want to elminate the space entirely, or do you want to reduce it by ca 50% (as appears to be suggested by the red line in your sketch)? – Mico Jun 13 '18 at 9:23

If I understand your sketch correctly, you'd like to reduce the distance between the upper edge of the text block and the chapter header by half. If this understanding is correct, you may achieve your goal by adding the following code to the preamble:

\usepackage{etoolbox}
\makeatletter
\makeatother


A compilable example, which assumes that the vertical space between the upper edge of the text block and unnumbered chapters should be reduced by 50% as well:

\documentclass{report}
\usepackage[Lenny]{fncychap}

\usepackage{etoolbox}
\usepackage{showframe} % omit this package in real document
\makeatletter
\makeatother

\begin{document}
\chapter{Fancy title with Latex}
\chapter*{An unnumbered chapter}
\end{document}


Here's the resulting screenshot (the framelines are drawn by the showframe package; don't load this package in a real document.)

For comparison, the next screenshot shows what the title page would look like without the \patchcmd instructions. As you can see, the distance between the top frame line (which represents the upper edge of the text block) and the upper decorative line of the chapter header is twice as large (50pt vs 25pt) as it is in the first screenshot.

• it produces a same result, i can't reduce a space between a chapter and margin top of page – YounessGI Jun 13 '18 at 9:12
• @YounessGI - The space between the upper edge of the text block (which isn't the same as the upper edge of the pge!) is definitely reduced -- by half -- in the example code I provided. If the code suggested above isn't working for you, it must because you have different code. Please advise as to how your document code differs from what I posted above. – Mico Jun 13 '18 at 9:20
• I want to raise the chapter title display of the first page of the chapter at the top, because it is displayed at the bottom. – YounessGI Jun 13 '18 at 9:24
• @YounessGI -- If your chapter headers really are at the bottom of the page, then there's something very odd going on. If you want no space between the upper edge of the text block (which is not the same as the upper edge of the page), you should change \vspace*{25\p@} to \vspace*{0\p@}. (I realize now I hadn't understood your sketch correctly.) – Mico Jun 13 '18 at 9:29
• that's not what I want, I want the chapter display to be a little higher than it is now, i find to reduce margin top of chapter page – YounessGI Jun 13 '18 at 9:34