Text FormattingHow to change size of fons in \chapter{} or \section{} part

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
user22741
Posts: 35
Joined: Fri Nov 09, 2018 12:03 pm

How to change size of fons in \chapter{} or \section{} part

Post by user22741 »

Hi, I'm starting using Latex, and I need some help with the problem I have.
I have created document like this:

Code: Select all

\documentclass[12pt,a4paper,titlepage]{report}
\usepackage[utf8]{inputenc}
\usepackage[top=2cm, bottom=2cm, left=2.5cm, right=2.5cm]{geometry}
 
\title{Nazwa projektu}
\date{}
 
\begin{document}
\maketitle
\tableofcontents
 
\chapter{chapter 1}
\section{ sec 1}
\section{sec 2}
text text text TEXT text
 
 
\end{document}


and now I want to change size of font for \chapter \section \subsection etc. parts (at best for whole document), but all methods I've tried like \small, \fontsize{}{} don't work for this parts of text - just normal text changes. Now the text there is too large, so it doesn't fit in one line and don't look esthetic.
I would appreciate the help very much :D

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

How to change size of fons in \chapter{} or \section{} part

Post by Johannes_B »

You can use package titlesec to customize your chapter and section titles.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

How to change size of fons in \chapter{} or \section{} part

Post by Stefan Kottwitz »

Welcome to the forum!

Compare it to

\documentclass[headings=normal,a4paper]{scrreprt}

or

\documentclass[headings=small,a4paper]{scrreprt}

Stefan
LaTeX.org admin
Post Reply