# Change chapter heading and insert line at top of pages.

I'm using this preamble:

\documentclass[pdftex,10pt,b5paper,twoside]{report}
\usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}
\usepackage[comma]{natbib}
\usepackage{lmodern}
\usepackage{setspace}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{graphics}
\usepackage{color}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{courier}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{calc}
\usepackage{caption}
\usepackage{booktabs}
\usepackage{ctable}
\usepackage{mathtools}


My problem is that I do not have enough time to completely redo the layout of the hole report, but I would like to fix to things.

1. How do I remove "Chapter" heading and replace it with \chapter{THIS}. Like:

1 Introduction

text text text text text text text text text


Chapter 1

Introduction

text text text text text text text text text


Also, I need the "new" heading to be placed at the "Chapter" position.

2. How do i make a line at the top of the pages telling which "chapter" you're in. (not in the appendices though)

-

Both requirements can be achieved with the help of the titlesec package (make the necessary adjustments to suit your needs):

\documentclass[b5paper,twoside]{report}
\usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}% just to generate filler text

\titleformat{\chapter}[block]
{\normalfont\huge\bfseries}{\thechapter}{20pt}{\Huge}
\titlespacing*{\chapter}{0pt}{50pt}{40pt}

\newpagestyle{mystyle}{
\pagestyle{mystyle}

\begin{document}

\chapter{Test chapter}
\section{Test section}
\lipsum[1-30]

\end{document}


You can use \pagestyle{plain} in the body of your document, just before the appendices, to restore the plain page style.

EDIT: the pdftex option shouldn't be gived (modern LaTeX systems automatically detect the driver used). Also, the 10pt option is used by default, so you could safely write

\documentclass[b5paper,twoside]{report}

-
actually the pdftex option does not issue any message, because it's used by graphicx and hyperref; it shouldn't be given anyway. –  egreg Jun 4 '11 at 21:56
@egreg: you're right. I forgot that the OP was using graphicx and hyperref. –  Gonzalo Medina Jun 4 '11 at 22:22