General ⇒ Changing section heading font size
Changing section heading font size
I would like to change the size of font used for section headings (make them smaller to save space). Is there an easy way to do this? I tried \section{\large{Section Title}}, but this doesn't change the size of the section number. \large{\section{Section Title}} completely messes up the formatting. I'm using the standard standard article document class. I suspect I could do something via defining a new command, but this is rather beyond my level of experience. Any help would be much appreciated.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Changing section heading font size
1.- A direct redefinition of \section:
Code: Select all
\makeatletter
\renewcommand\section{\@startsection{section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\large\bfseries}}
\makeatother
Code: Select all
\usepackage{titlesec}
\titleformat{\section}{\large\bfseries}{\thesection}{1em}{}
Code: Select all
\usepackage{sectsty}
\sectionfont{\large}
By the way, never use formatting commands in the argument of \section and friends. For changing their aspect, redefine those commands as suggested above. Likewise, \large and similar commands does not have an argument. Hence the pair of braces after them are superfluous, that is, \large{text} gives the same result as \large text (with no braces). Braces, however, are frequently used to limit the scope of such a command. If you have a line of code like
Code: Select all
text before {\large text inside} text after
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Changing section heading font size
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Changing section heading font size
i.e.
\section{introduction}
output
1. introduction
Re: Changing section heading font size
Cheers,
Nkal