General ⇒ chapter heading position
chapter heading position
Hi,
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
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
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
chapter heading position
Omit this code and use the titlesec package. It lets you customize the headings of your document.
Best regards and welcome to the board
Thorsten¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
Hi chao,
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
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
LaTeX.org admin
Re: chapter heading position
your help is concise and sufficient.


- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
Hi chao,
with the titlesec package mentioned by Thorsten it could be very simple. Here's the complete changed code with centered chapter titles:
Stefan
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}
LaTeX.org admin
Re: chapter heading position
Thanks stephan!
where to find these infomations?


where to find these infomations?
chapter heading position
Read the packages documentation. Usually, when the use of a package is suggested, a link (to the location of that package on CTAN) is provided (see the response by localghost above). There you can find information about the package and its documentation.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
Hi chao,
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
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
LaTeX.org admin
Re: chapter heading position
I've asked how to place a chapter title in the mid of a page.
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}
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: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
chapter heading position
Hi Chao,
both can be done by using \MakeUpercase (not \uppercase):
Stefan
both can be done by using \MakeUpercase (not \uppercase):
Code: Select all
\titleformat{\chapter}[display]
{\centering\large\bfseries}
{\MakeUppercase{\chaptertitlename}\ \thechapter}{20pt}{\large\MakeUppercase}
LaTeX.org admin