Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
    

    instead of:

    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)

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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}{
  \sethead{\thechapter\  \chaptertitle}{}{}
  \sethead{}{\thepage}{}}
\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}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.