General ⇒ chapter heading position
chapter heading position
I've got a question about positioning Chapter Heading.
I found a short script looks like this:
\documentclass[twoside,letterpaper,12pt]{report}
\makeatletter
\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \centering
\normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\huge\bfseries \@chapapp\space \thechapter
\par\nobreak
\vskip 20\p@
\fi
\fi
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \centering
\normalfont
\interlinepenalty\@M
\Huge \bfseries #1\par\nobreak
\vskip 40\p@
}}
\makeatother
\begin{document}
\chapter*{Introduction}
\end{document}
However it works only for unnummbered chapter.
e.g. Introduction
I would like to have
e.g. chapter1
Introduction
shown in the middle of a page.
Thanks a lot
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
chapter heading position
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
welcome to this forum!
Those redefinitions work for \chapter with the book class without problem.
For using it with the report class I would delete two lines, the one containing \if@mainmatter and one of the following lines containing \fi.
Stefan
Re: chapter heading position

- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
with the titlesec package mentioned by Thorsten it could be very simple. Here's the complete changed code with centered chapter titles:
Code: Select all
\documentclass[twoside,letterpaper,12pt]{report}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\centering\normalfont\huge\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\begin{document}
\chapter*{Introduction}
\chapter{First}
\end{document}
Re: chapter heading position


where to find these infomations?
chapter heading position
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
you can find this information by reading the titlesec documentation. Thorsten already gave a link above, where you can find the link to that documentation.
I gave the small example above to demonstrate that the usage of titlesec may be simple, though in the documentation there may be much to read.
Stefan
Re: chapter heading position
a new problem following the original one
% place chapter headings in the middle of the page
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\centering\large\bfseries}
{\chaptertitlename\ \thechapter}{20pt}{\large\uppercase}
Now, how can I change the "chapter 1" into uppercase? I tried to find the infomation from titlesec.pdf provided by others but could not find proper place.
Also, if I want to change the ListOfFigures and others(ListOfTables...) into uppercase how to do that?
ListOfFigures.tex
\listoffigures
\addcontentsline{toc}{chapter}{List of Figures}
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
both can be done by using \MakeUpercase (not \uppercase):
Code: Select all
\titleformat{\chapter}[display]
{\centering\large\bfseries}
{\MakeUppercase{\chaptertitlename}\ \thechapter}{20pt}{\large\MakeUppercase}