2

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.

2
  • 2
    read titlesec pack man
    – Jared Lo
    Jun 11, 2014 at 3:11
  • @JaredLo I don't have time to learn how to fish right now. Jun 11, 2014 at 3:17

3 Answers 3

4

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}
6
  • How can you make this work with the second MWE? Jun 11, 2014 at 3:20
  • @fctaylor25: Change \quad to \par? I'll add some more detail to adhere to your requirements.
    – Werner
    Jun 11, 2014 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. Jun 11, 2014 at 3:24
  • That's what I'm talking about! It's perfect. Thanks Werner! Jun 11, 2014 at 3:31
  • 1
    @RandyRanderson: \chapter* uses \@makeschapterhead instead of \@makehapterhead. So, define your own \@makeschapterhead that matches the above \@makechapterhead only without the content related to \thechapter (as \chapter* doesn't print the chapter number).
    – Werner
    Sep 25, 2015 at 10:00
4

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

0

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .