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.

The default looks something like this:

Chapter 1

Chapter Title

I want it to look like this (but centered):

1

Chapter Title

In addition:

  1. The chapter number should be bold, Large
  2. The chapter title should be normal text, Large, uppercase.
  3. I'd like to be able to control the spacing between the chapter number and the top of the page, the chapter number and the chapter title, and the chapter title and the body text.

Thanks!

EDIT. Here are some MWEs:

This one is the default. It doesn't do what I want at all:

\documentclass[]{report}
\begin{document}
\chapter{Vector Spaces}
\end{document}

This one is closer, but doesn't have the chapter number above the chapter title:

\documentclass{report}
\makeatletter
\def\@makechapterhead#1{%
    \vspace*{-5em}%
    {\parindent \z@  \normalfont
    \interlinepenalty\@M
    \Large\centering \thechapter \quad #1\par\nobreak
    \vskip 2.5em
}}
\makeatother

\begin{document}
\chapter{VECTOR SPACES}
\end{document}

This one also doesn't have uppercase font built into it. I had to capitalize the letters myself, which isn't a big problem but I'd still like it fixed.

share|improve this question
2  
read titlesec pack man –  Jared Lo Jun 11 at 3:11
    
@JaredLo I don't have time to learn how to fish right now. –  fctaylor25 Jun 11 at 3:17

3 Answers 3

up vote 4 down vote accepted

The easy option here is to redefine \@chapapp to just gobble its argument:

enter image description here

\documentclass{report}

\makeatletter
\let\@chapapp\@gobble
\makeatother

\begin{document}
\chapter{Vector Spaces}
\end{document}

Why does this work? Look at \@makechapterhead (from report.cls):

\def\@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@
  }}

\@chapapp is always followed by \space. So, redefining it to \@gobble will just absorb \space.


In terms of your \@makechapterhead specification, here's some modifications:

enter image description here

\documentclass{report}

\makeatletter
\def\@makechapterhead#1{%
    \vspace*{-5em}% Space above number
    {\parindent \z@  \normalfont
    \interlinepenalty\@M
    \Large\centering \textbf{\thechapter}%
    \par\vspace{1em}% Space between number and title
    \MakeUppercase{#1}%
    \par\vspace{2.5em}% Space between title and text
}}
\makeatother

\begin{document}
\chapter{Vector Spaces}
\end{document}
share|improve this answer
    
How can you make this work with the second MWE? –  fctaylor25 Jun 11 at 3:20
    
@fctaylor25: Change \quad to \par? I'll add some more detail to adhere to your requirements. –  Werner Jun 11 at 3:22
    
It almost works. It puts the number above the chapter title, but I'd like there to be more space in between. Also the number isn't bold. –  fctaylor25 Jun 11 at 3:24
    
That's what I'm talking about! It's perfect. Thanks Werner! –  fctaylor25 Jun 11 at 3:31

With titlesec:

\documentclass{report}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\filcenter}
{\LARGE\bfseries\thechapter}
{20pt}
{\Huge\MakeUppercase{#1}}

\titleformat{name=\chapter,numberless}[display]
{\normalfont\huge\bfseries\filcenter}
{}
{20pt}
{\Huge\MakeUppercase{#1}}

\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\usepackage{showframe}
\begin{document}
\chapter{Vector Spaces}
Some text here.
\chapter*{Vector Spaces}
Some text here.
\end{document}

enter image description here

share|improve this answer

ok load this en the preamble

\documentclass[12pt]{book}
.
.
.
.
\usepackage{titlesec}

\titleformat{\chapter}[display] % 
{\bfseries\Huge} %
{% Chapter label 

\filright 
%\Large\chaptertitlename\ % Name of Current chapter
\textbf{\Large\thechapter} % number of current chap 
} 
{0mm} % space between number of chapter and its name
{\filright} 
[\vspace{-1mm}\vspace{2pt}
]

\begin{doucument}
share|improve this answer

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.