I dont know how to custom the chapter like this. Can you help me please
2 Answers
I really advise against scaling fonts with \scalebox. My suggestion would be:
- use a modern font encoding
- use a full scalable font, there are several options for Computer Modern
- select the font size you want with
\fontsize...\selectfont
Like this:
\documentclass{book}
\usepackage[T1]{fontenc}\usepackage{lmodern}
\usepackage{titlesec}
\usepackage{graphicx} % Include this package
% Customizing the chapter title format
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}
{\fontsize{4cm}{4cm}\selectfont\thechapter}{20pt}{\Huge} % Scale the chapter number (change size)
% Customizing the spacing before and after the chapter title
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\begin{document}
\setcounter{chapter}{9} % remove me
\chapter{Polar Coordinates, Parametric Equations}
% Your chapter content goes here.
\end{document}
Thanks to @John Smith for the MWE --- @Benjamín García, please provide a minimal working example (MWE) for your new questions.
- 40,848
- 3
- 64
- 125
Try this:
\documentclass{book}
\usepackage{titlesec}
\usepackage{graphicx} % Include this package
% Customizing the chapter title format
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries\centering}
{\scalebox{3}{\thechapter}}{20pt}{\Huge} % Scale the chapter number (change size)
% Customizing the spacing before and after the chapter title
\titlespacing*{\chapter}{0pt}{50pt}{40pt}
\begin{document}
\chapter{Polar Coordinates, Parametric Equations}
% Your chapter content goes here.
\end{document}
\setcounter{chapter}{9} can be added before the first \chapter command to start the chapter numbering at 10.
The formatting command within \titleformat does not print the chapter number anymore because the {} after \huge\bfseries\centering is empty. If you want to manually insert "10", you would put it in there.
- 964
-
Changed it, so the chapter is automatically numbered – John Smith Nov 23 '23 at 01:18
-
2sorry, but i cant create a table of contents if i use your code. how can it be fixed?? – Benjamín Garcés Nov 23 '23 at 01:22
-
You need to compile it twice – John Smith Nov 23 '23 at 01:25
-
Thank you very much, another question, is it possible to enlarge only the size of the chapter number? – Benjamín Garcés Nov 23 '23 at 01:32
-
{\scalebox{3}{\thechapter}}{20pt}{\Huge} % Scale the chapter number by changing the number in the scalebox – John Smith Nov 23 '23 at 01:50
-
I've edited my answer – John Smith Nov 23 '23 at 01:50
-
sorry but, and what specific place i have to put this? – Benjamín Garcés Nov 23 '23 at 01:55
-
I've edited the answer so it includes it now – John Smith Nov 23 '23 at 02:13


