Change font size of chapter, section etc, without using sectsty package

6,497 views
Skip to first unread message

pfreumo

unread,
Aug 30, 2010, 9:28:49 AM8/30/10
to LaTeX Users Group
Hi guys,

I got a problem writing my thesis. I want to set the font size of
chapters and sections (they´re too large when writing in 12pt). When I
use the secsty package this works, but messes up an other problem that
was previously solved by Peter Flynn, namely writing the chapter
number next to the chapter title and omitting the word "Chapter".

This was done by changing the definition of \@makechapterhead my
thesis.cls file.

\def\@makechapterhead#1{%
\vspace*{50\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\Huge\bfseries\thechapter
\fi
\fi
#1\par\nobreak
\vskip 40\p@
}}

I guess, I´ve got to change the definition for chapter size and
sections size as well, but I don´t know how.

I´m using a thesis-template file from here
http://openwetware.org/wiki/LaTeX_template_for_PhD_thesis

wich is basically using book.sty and fancyhdr.sty

I appreciate your help,

cheers Moritz

Werner Grundlingh

unread,
Aug 30, 2010, 11:57:03 AM8/30/10
to LaTeX Users Group
On Aug 30, 6:28 am, pfreumo <pfreumo...@gmail.com> wrote:
> Hi guys,
>
> I got a problem writing my thesis. I want to set the font size of
> chapters and sections (they´re too large when writing in 12pt). When I
> use the secsty package this works, but messes up an other problem that
> was previously solved by Peter Flynn, namely writing the chapter
> number next to the chapter title and omitting the word "Chapter".
>
> This was done by changing the definition of \@makechapterhead my
> thesis.cls file.
>
> \def\@makechapterhead#1{%
>   \vspace*{50\p@}%
>   {\parindent \z@ \raggedright \normalfont
>     \ifnum \c@secnumdepth >\m@ne
>       \if@mainmatter
>         \Huge\bfseries\thechapter
>       \fi
>     \fi
>     #1\par\nobreak
>     \vskip 40\p@
>   }}
>
> I guess, I´ve got to change the definition for chapter size and
> sections size as well, but I don´t know how.
>
> I´m using a thesis-template file from herehttp://openwetware.org/wiki/LaTeX_template_for_PhD_thesis
>
> wich is basically using book.sty and fancyhdr.sty
>
> I appreciate your help,
>
> cheers Moritz

Moritz,

As a first stab at this, you can consider reading up on the following
two options:
[1] The titlesec package, available online via CTAN from:
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=titlesec
[2] Vincent Zoonekynd's chapter or section styles:
http://zoonek.free.fr/LaTeX/LaTeX_samples_chapter/0.html
http://zoonek.free.fr/LaTeX/LaTeX_samples_section/0.html

Werner

Peter Flynn

unread,
Aug 30, 2010, 7:29:38 PM8/30/10
to latexus...@googlegroups.com
On Mon, Aug 30, 2010 at 2:28 PM, pfreumo <pfreu...@gmail.com> wrote:
Hi guys,

I got a problem writing my thesis. I want to set the font size of chapters and sections (they´re too large when writing in 12pt). When I use the secsty package this works, but messes up an other problem that was previously solved by Peter Flynn, namely writing the chapter number next to the chapter title and omitting the word "Chapter".

Yes, sectsty will overwrite the change I suggested.
You can fix the font size for the chapters in the code I gave you by changing the \Huge to one of the smaller sizes, eg \huge, \LARGE, \Large, etc (see list at http://latex.silmaril.ie/formattinginformation/chapter8.html#fontsize) or by using the \fontsize command.
 
I guess, I´ve got to change the definition for chapter size and sections size as well, but I don´t know how.

Yes, just copy the section-defining commands from book.cls  and change the font sizes in them. You can see \Large, \large, and \normalsize used in these ones:

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3.5ex \@plus -1ex \@minus -.2ex}%
                                   {2.3ex \@plus.2ex}%
                                   {\normalfont\Large\bfseries}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}

Change them to something else.
///Peter

pfreumo

unread,
Aug 31, 2010, 2:02:13 AM8/31/10
to LaTeX Users Group
Thank you guys! Peter's post definitely works and it's kind of the
same approach supposed from Werners post
Again, well done!!!




On Aug 31, 1:29 am, Peter Flynn <anglebrac...@gmail.com> wrote:
> On Mon, Aug 30, 2010 at 2:28 PM, pfreumo <pfreumo...@gmail.com> wrote:
> > Hi guys,
>
> > I got a problem writing my thesis. I want to set the font size of chapters
> > and sections (they´re too large when writing in 12pt). When I use the secsty
> > package this works, but messes up an other problem that was previously
> > solved by Peter Flynn, namely writing the chapter number next to the chapter
> > title and omitting the word "Chapter".
>
> Yes, sectsty will overwrite the change I suggested.
> You can fix the font size for the chapters in the code I gave you by
> changing the \Huge to one of the smaller sizes, eg \huge, \LARGE, \Large,
> etc (see list athttp://latex.silmaril.ie/formattinginformation/chapter8.html#fontsize) or by
Reply all
Reply to author
Forward
0 new messages