Text Formatting ⇒ Title size and format specification
Title size and format specification
Chapter 1. Title of Chapter
At the moment, using the defaults, the font is much larger and the chapter and title appear left justified on two lines as:
Chapter 1
Title of Chapter
How do I do this?
Your help is greatly appreciated
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
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Title size and format specification
Re: Title size and format specification
What <shape> should I be using if I want the whole heading on one line?
Re: Title size and format specification
\titleformat{\chapter}[display]
{\normalfont\sffamily\huge\bfseries}
{\chaptertitlename\ \thechapter}{14pt}{\Huge}
I need the "Chapter 1" and the title to appear on the same line.
I Need a "." after the Chapter 1
I don't understand what the \huge and {\Huge} are for. I need everything to be 14pt.
Can you perhaps help?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Title size and format specification
Code: Select all
\documentclass{report}\usepackage{blindtext}\usepackage{showframe}\usepackage{titlesec}\titleformat{\chapter}[block]{\centering\fontsize{14pt}{16pt}\selectfont}{\chaptertitlename~\thechapter.}{12pt}{}\begin{document}\chapter{Wombat}\blindtext\chapter*{Wombat}\blindtext\chapter{Wombat flying high in the sky to visit the magicalunicorn riding on the clouds}\blindtext\end{document}
Re: Title size and format specification
Thank you so much. Can you please explain what the bits do:
\titleformat{\chapter}[block]{\centering\fontsize{14pt}{16pt}\selectfont}{\chaptertitlename~\thechapter.}{12pt}{}
What is the tilde for?
Why 12pt right at the end?
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Title size and format specification

Or look into the manual, like i did?

block: the manual hinted that.
centering: You wanted centered
fontsize: You wanted that.
chaptertitlename: Prints chapter
\thechapter: prints the chapternumber
tilde between: unbreakble space between
12pt: randomly used space between chapternumber and actual chapter title
Re: Title size and format specification
I'm not that adventurous when I'm a single mom with two kids, an elderly mother, a full-time job and a thesis manuscript to get printed. Then I just want to get it done. At least I managed to get the sections and subsections done on my own by trying and reading the manual before I had to take the mother to the shop and sort the minecraft server out for the son. Now I just have to take him to the orthodontist, have the double glazed window with water in it fixed and then I can send the script off to get a quote for binding.
So your help is even more appreciated than usual.
Jannetta
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Re: Title size and format specification
Make sure to take a break once in a while

Good luck with your thesis and enjoy life with your family
Johannes