Generalno pagebreak after chapter title- report class

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

no pagebreak after chapter title- report class

Post by christina_t »

Hi! I am writing my thesis, and I am using the report class to include all the different chapter in one document. I am trying to avoid so much white spaces, and I would like to have the chapter title and the text start in the same page.

this is the code i am using

Code: Select all

\documentclass[12pt,a4paper]{report}

\usepackage{natbib}
\usepackage{setspace}
\usepackage[dvipdfm]{graphicx}
\usepackage{color}
\usepackage{epsf}
\usepackage{amsfonts}
\usepackage{float}
\usepackage{fancyhdr}

\onehalfspacing

\oddsidemargin 0.0in \textwidth 6.5in
\pagestyle{fancy}

 
\begin{document}

\begin{titlepage}
\begin{center}
\vspace*{1in}
{\LARGE TITLE OF THE THESIS}
\par
\vspace{1.5in}
{\large Author name}
\par
\vfill
A Thesis submitted for the degree of Doctor of Philosophy
\par
\vspace{0.5in}
University of xxx
\par
\vspace{0.5in}
October 2008
\end{center}
\end{titlepage}

\renewcommand{\baselinestretch}{1.66}

\pagenumbering{roman}
\fancyhead[L]{}
\fancyhead[R]{Contents}
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables

\begin{abstract}

\end{abstract}

\pagenumbering{arabic}

\chapter{Introduction}
\fancyhead[L]{Chapter 1}
\fancyhead[R]{Introduction}
\include{I}

\chapter{main thesis}
\fancyhead[L]{Chapter 2}
\fancyhead[R]{}
\include{II}

\chapter{Conclusions}
\fancyhead[L]{Chapter 10}
\fancyhead[R]{Conclusions}
\include{X}


\bibliographystyle{humannat}
\addcontentsline{toc}{chapter}{Bibliography}
\fancyhead[L]{}
\fancyhead[R]{Bibliography}
\bibliography{thesisbiblio}

\end{document}
Many thanks in advance!

Christina

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

Re: no pagebreak after chapter title- report class

Post by Stefan Kottwitz »

Hi Christina,

use \input instead of \include. if you want to use \include, then move the corresponding \chapter command into the included file.

Stefan
LaTeX.org admin
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: no pagebreak after chapter title- report class

Post by christina_t »

Hi Stefan, many thanks it works. :D But how could I also make the title of each chapter start at the top of the page?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10347
Joined: Mon Mar 10, 2008 9:44 pm

no pagebreak after chapter title- report class

Post by Stefan Kottwitz »

By default 50pt are inserted before the chapter heading. You can change it by redefining \@makechapterhead in your preamble:

Code: Select all

\makeatletter
\renewcommand*\@makechapterhead[1]{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother
As you can see I'commented \vspace*{50\p@} out.

Stefan
LaTeX.org admin
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: no pagebreak after chapter title- report class

Post by christina_t »

thank you so much!! it works great! :D
christina_t
Posts: 27
Joined: Tue Sep 16, 2008 1:16 am

Re: no pagebreak after chapter title- report class

Post by christina_t »

hi! how could i do the same thing (ie less white space at the beginning of the chapters) with the abstract page and the \chapter* environment? many thanks
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

no pagebreak after chapter title- report class

Post by gmedina »

Hi Christina,

for \chapter*, you will need to handle those 50pt of vertical space too:

Code: Select all

\makeatletter
\def\@makeschapterhead#1{%
  %\vspace*{50\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \Huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}
\makeatother
1,1,2,3,5,8,13,21,34,55,89,144,233,...
jbone
Posts: 1
Joined: Thu Mar 12, 2009 12:23 am

Re: no pagebreak after chapter title- report class

Post by jbone »

I just came across this thread, as I am looking for a solution to a very similar problem. My thesis is looking fine, apart from these large white spaces above the abstract at the start of each chapter. There are also large white spaces above the first page of each appendix.

I am using the thesis class (which came with MikTeX and TeXnicCenter). I have been digging around the thesis.cls file and have tried zeroing all the \vspace commands, but to no avail.

I'm slightly tearing my hair out over this one, and would be really grateful if someone could help. :?
MagisterT
Posts: 2
Joined: Tue Mar 08, 2011 10:01 am

no pagebreak after chapter title- report class

Post by MagisterT »

I use the titlesec-package. On the top of nearly each document I am writing I paste the following code.

Code: Select all

\titleformat{\chapter}[hang]{\mdseries\sffamily\LARGE}{\thechapter.\quad}{-6pt}{}
\titleclass{\chapter}{straight}
\chapter now does (nearly) everything I want. :D
Last edited by cgnieder on Tue Sep 04, 2012 8:04 pm, edited 1 time in total.
Post Reply