## LaTeX forum ⇒ General ⇒ top margin

LaTeX specific issues not fitting into one of the other forums of this category.
sherlock
Posts: 34
Joined: Fri Apr 11, 2008 9:41 am

### top margin

Hi
I would like to set up the top margin of chapter
pages to be the same as the rest of the document?
I used the solution of this topic
http://www.latex-community.org/forum/viewtopic.php?f=5&t=1533.
But when I to use the code this package
\usepackage[Sonny]{fncychap} doesnt make effect

1. \documentclass[a4paper,11pt]{report}
3. \usepackage[Sonny]{fncychap}

This is an image of with the package [Sonny]{fncychap}

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
Hi,

in this case, you can use the titlesec package to emulate the Sonny style for chapter headings and simultaneously suppress the extra vertical space at the beginning of each chapter (of course, with the help of this package, you can design your own new formats for the sectional units, making this package a superior and more versatile alternative to fncychap); please take a look at the following simple example:

1. \documentclass[a4paper,12pt]{report}
2. \usepackage[lmargin=3.0cm, rmargin=1.0cm,tmargin=2.50cm,bmargin=2.50cm]{geometry}
3. \usepackage[explicit]{titlesec}
4. \usepackage{lipsum}
5.
6. \titleformat{\chapter}[display]
7. {\normalfont\Large\sffamily}
8. {\flushright\MakeUppercase\chaptertitlename\ \Huge\thechapter}{20pt}
9. {\hrulefill\Large\sffamily\flushright\vskip-10pt#1\vskip-10pt\hrulefill}
10. \titlespacing*{\chapter}
11. {0pt}{-40pt}{40pt}
12.
13. \begin{document}
14. \tableofcontents
15.
16. \chapter{First chapter}
17. \lipsum[1-20]
18.
19. \end{document}

1,1,2,3,5,8,13,21,34,55,89,144,233,...

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA
If you do want to use fncychap rather than titlesec, a very simple option is to just to put in some negative space in the \ChNameVar option provided by that package. E.g.:

1. \documentclass[11pt,a4paper]{report}
2. \usepackage[Sonny]{fncychap}
3. \ChNameVar{\vspace*{-1in}\Large\sf}
4. \usepackage{lipsum} % for adding filler text
5. \begin{document}
6. \chapter{My chapter title}
7. \lipsum[15-40] % filler text
8. \end{document}

You may need to change -1in to something else depending on your document class, etc. (and someone may know the variable name), but that looks about right to me.

sherlock
Posts: 34
Joined: Fri Apr 11, 2008 9:41 am
Thanks