General ⇒ Chapter headings without the word chapter!
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Chapter headings without the word chapter!
welcome to the board!
If you want your own style for chapter headings, sections etc., I recommend to use the titlesec package. There's some documentation to read, but it's worth a read.
You could use fancyhdr to customize your page headings, it's recommendable, without that package you may use \markboth and \markright.
Stefan
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Re: Chapter headings without the word chapter!
Thank you very much for the reply and the warm welcome

I read the manual and spent the whole day trying to improve my title, but I've still problem I cannot manage to solve. In my code, I put the following lines to define my fonts :
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{Hoefler Text}
\setmonofont[Scale=MatchLowercase]{Hoefler Text}
\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Hoefler Text-Italic} %Zapfino
But my title isn't in the Hoefler Italic font and I don't understand why. I saw that when using the \titleformat, you can play on the format. Therefore, I tried to put {\fontfamily{hoefler}}, or try to find the code of the Hoefler Text-Italic to use the command \fontencoding{}, but I didn't find it. The code defining my title (not completely optimized yet) is :
\renewcommand{\chaptername}{}
\renewcommand{\thechapter}{}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}}
\titleformat{\chapter}[display]
{\bfseries\Huge\itshape}
{\filleft\MakeUppercase{\chaptertitlename} \Huge\thechapter}
{4ex}
{\titlerule
\vspace{2ex}%
\font\x="Hoefler Text-Italic"
\fontsize{30}{10}
{\x\addfontfeature{Color=B4B4B4, Scale=2, Alternate=1}1}\kern-2ex
{\x\addfontfeature{Color=404457, Scale=8, Alternate=1}1}\kern-1ex
\vspace{8ex}%
\filright
}
[
\vspace{2ex}%
\titlerule]
I removed explicitely the numbers from my chapter titles, because I wanted to make them somehow different. But the second problem is that I would like that for the sections, subsections,... the number contains the number of the chapter : for example Section 2.1. Otherwise, all the sections start with a 1 and this is not clear any more which section we are talking about. I managed to reput the number of the section using :
\renewcommand{\thesection}{\arabic{section}}
And for the chapter, I tried this, but I doesn't seem to be the way to do it :
\renewcommand{\thesection}{\arabic{chapter}}
If you have any clue about these questions, it would be of great help.
Thanks,
Gigi
Re: Chapter headings without the word chapter!
I've read some of the help here, but nothing has worked for me. All I want is to change the way my chapter headings look, from:
Chapter 1
'Chapter title'
to:
1 'Chapter title'
I don't want anything else to change; just to get rid of the word chapter and put the actual title of the chapter next to the number instead of on a new line. There must be a simple way to do this, right?
Thanks

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Chapter headings without the word chapter!
Best regards and welcome to the board
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Chapter headings without the word chapter!

In case anyone is trying to do the same here's what I did:
First I installed the titlesec package
\usepackage{titlesec}
and then added this one line to the preamble and presto! Beauty! Poetry! Etc...
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{}
Sigh... now to actually write some content under my nice headings....
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Chapter headings without the word chapter!
very good that your headings are perfect now!
Just one remark: the \bf macro is obsolete, better use LaTeX2e font commands.
Stefan
Chapter headings without the word chapter!
wyssel wrote:Hey thanks! I got my nice chapter headings now. And it was really easy, just as I thought
In case anyone is trying to do the same here's what I did:
First I installed the titlesec package
\usepackage{titlesec}
and then added this one line to the preamble and presto! Beauty! Poetry! Etc...
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{}
Sigh... now to actually write some content under my nice headings....
Hi wyssel
This was exactly what i have been looking for.Thanks for sharing. I only have one little problem with it now, the table of contents command (\tableofcontents) could not be run. It only runs when i remove the \titleformat...
any idea
Re: Chapter headings without the word chapter!
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{} Good one.
Chapter headings without the word chapter!
It make:Yoni wrote:Got it right with document class scrbook. It does not require
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{} Good one.
1 Chapter First
2 Chapter Second
How make:
1. Chapter First
2. Chapter Second
?
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Chapter headings without the word chapter!
Just add a dot at the appropriate place.Nihisil wrote:It make:Yoni wrote:Got it right with document class scrbook. It does not require
\titleformat{\chapter}[hang]{\bf\huge}{\thechapter}{2pc}{} Good one.
1 Chapter First
2 Chapter Second
How make:
1. Chapter First
2. Chapter Second
?
Code: Select all
\documentclass[11pt,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[raggedright]{titlesec}
\usepackage{blindtext}
\titleformat{\chapter}[hang]{\bfseries\huge}{\thechapter.}{2pc}{}
\titlelabel{\thetitle.\quad} % For consistency in all headings
\begin{document}
\blinddocument
\end{document}
And next time please open a new topic instead of answering to one that is more than one year old. Your questions then will be recognized much faster as such.
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10