Generalchanging fontsize of chapter or section

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mamun4105
Posts: 1
Joined: Fri Jun 06, 2008 8:27 pm

changing fontsize of chapter or section

Post by mamun4105 »

hi there!

I am a new user in this forum. I want to know that how can I change font size of a chapter of section. I've tried \section{\fontsize{22}{30} Section title}. But there is two problems:

1. The font size of this section in table of contents changed.
2. The font size of section numeral did not change.


Please help

Thank you

=============
Saleh Al - Mamun

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

changing fontsize of chapter or section

Post by localghost »

Perhaps the titlesec package will do the trick.


Best regards
Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

changing fontsize of chapter or section

Post by Stefan Kottwitz »

Hi Saleh Al - Mamun,

welcome to the LaTeX Community Forum!

You did not mention the document class you are using. Some document classes like KOMA classes and the memoir class provide specific commands for changing the fonts of chapter and section names. If you use a standard LaTeX class like report or book then the titlesec package mentioned by Thorsten should be easier than to redefine the class macros, although there is some documentation to read.

Without titlesec you could redefine \section with \@startsection, here is a short description with example: how to change the appearance of the entire section.

By the way, when I use \fontsize I write \selectfont after it. And in general for different settings of chapter or section titles in document and table of contents you could use the optional parameter for \chapter or \section like \section[toc entry]{title} (see sectioning).

Stefan
LaTeX.org admin
Post Reply