You are on page 1of 4

sectioning - Change size of section, subsection, subsubsection, paragraph...

file:///C:/Users/Shashank Dixit/Downloads/sectioning - Change size of se...

TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related
typesetting systems. It's 100% free, no registration required.

Change size of section, subsection, subsubsection, paragraph and subparagraph title
I would like to increase the size of pretty much every headlines, so that it is more prominent than the
normal text.

I read about the titlesec package, but can't seem to find good example how to use the package.

Using Gonzalo Medina does in fact change the font size, however, it changes the default font as well.



{sectioning} {fontsize} {titlesec}

edited Jun 13 '12 at 22:16 asked Jun 13 '12 at 17:24
687 1 3 9

3 Answers

Here's an exaple using titlesec :




\section{Test section}
\subsection{Test section}
\subsubsection{Test section}
\paragraph{Test section}
\subparagraph{Test section}


I used the simplified version of \titleformat (i.e., \titleformat* ) since the only desired
change was in size, but you can use the extended version if "bigger" changes are required.
These are the default definitions for the standard classes (taken from the documentation):


so you can make bigger changes. The following image shows both the standard sizes and
the ones obtained with the above modifications:

1 of 4 8/16/2013 5:41 PM

.Change size of section. then it's not advisable to use titlesec (See About KOMA-Script and titlesec incompatibility) but to use the features provided by the KOMA classes: \documentclass{scrartcl} \setkomafont{section}{\LARGE} 2 of 4 8/16/2013 5:41 PM . And here's an exampe using the sectsty : \documentclass{article} \usepackage{sectsty} \sectionfont{\LARGE} \subsectionfont{\Large} \subsubsectionfont{\large} \paragraphfont{\large} \begin{document} \section{Test section} \subsection{Test section} \subsubsection{Test section} \paragraph{Test section} \subparagraph{Test section} \end{document} According to an edit to the original question.. the OP wanted also a sans serif font: \documentclass{article} \usepackage{titlesec} \titleformat*{\section}{\LARGE\bfseries\sffamily} \titleformat*{\subsection}{\Large\bfseries\sffamily} \titleformat*{\subsubsection}{\large\bfseries\sffamily} \titleformat*{\paragraph}{\large\bfseries\sffamily} \titleformat*{\subparagraph}{\large\bfseries\sffamily} \begin{document} \section{Test section} \subsection{Test section} \subsubsection{Test section} \paragraph{Test section} \subparagraph{Test section} \end{document} The above approaches are to be used mostly with the default document classes ( book . subsubsection.. file:///C:/Users/Shashank Dixit/Downloads/sectioning . article ).. paragraph. subsection.sectioning . if the document class used is one of the classes of the KOMA-Script bundle.Change size of se. report .

subsubsection. the situation is analogous: is also not advisable to use titlesec (See About memoir and titlesec incompatibility) but to use the features provided by the class.2ex}%                                      {1.. so titlesec is not advisable here.25ex\@plus ‐1ex \@minus ‐. as I did in the last code of my updated answer.5ex \@plus . KOMA-Script and titlesec are incompatible.25ex\@plus ‐1ex \@minus ‐. if I have the time I'll add some example.5ex \@plus . paragraph. I've provided an example on how to proceed with the KOMA classes in my updated answer. edited Jun 13 '12 at 23:34 answered Jun 13 '12 at 17:29 Gonzalo Medina 151k 10 351 545 Thanks.3ex \@plus. except for the first modification. – Gonzalo Medina Jun 13 '12 at 22:43 2 @cherrung that is crucial information that you should have mentioned in your original question. simply add \sffamily .2ex}%                                      {\normalfont\Large\bfseries}}% from \large \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%                                      {‐3..2ex}%                                    {2.. – cherrung Jun 13 '12 at 21:49 Sorry to revoke the accepted answer. Because changing the size without further options. Works pretty good.sectioning . file:///C:/Users/Shashank Dixit/Downloads/sectioning . Here's a small example in the article document class: \documentclass{article} \begin{document} \section{A section} \subsection{A subsection} \subsubsection{A subsubsection} \makeatletter \renewcommand\section{\@startsection {section}{1}{\z@}%                                    {‐3. – cherrung Jun 13 '12 at 22:17 1 @cherrung: How about just adding \sffamily to the list of corrections? – Werner Jun 13 '12 at 22:22 1 @cherrung as Werner said.2ex}%                                      {\normalfont\large\bfseries}}% from \normalsize 3 of 4 8/16/2013 5:41 PM .2ex}%                                      {1.Change size of se. subsection.. \setkomafont{subsection}{\Large} \setkomafont{subsubsection}{\large} \setkomafont{paragraph}{\large} \setkomafont{subparagraph}{\large} \begin{document} \section{Test section} \subsection{Test section} \subsubsection{Test section} \paragraph{Test section} \subparagraph{Test section} \end{document} For the memoir document class.2ex}%                                    {\normalfont\LARGE\bfseries}}% from \Large \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%                                      {‐3. Please refer to my first post. – Gonzalo Medina Jun 13 '12 at 23:35 You can just modify the sectional commands with the appropriate font size. it changes to a different font.5ex \@plus ‐1ex \@minus ‐.Change size of section.

.2 times \tf .Change size of section. then use \setuphead[chapter.title]        [style=\tfd] \setuphead[section.subject]      [style=\tfc] \setuphead[subsection. \ssb is 1. \ssa is 1.Change size of se. \ss is sans serif at body fontsize..sectioning . subsection. \tfb is 1. paragraph. For example. and so on. replace \normalfont with the appropriate definition.subsubject][style=\tfb] The font switch \tf equals the body fontsize.2 times \tfa and so on. If you want sans serif headings. \tfa is 1. \makeatother \section{A section} \subsection{A subsection} \subsubsection{A subsubsection} \end{document} For a different font.2 times \ssa . answered Jun 13 '12 at 23:46 Aditya 28.6k 1 49 110 4 of 4 8/16/2013 5:41 PM .subsubject][style=\ssb] Here also the same logic applies. You can change the heading style using: \setuphead[chapter.2 times \ss .title]        [style=\ssd] \setuphead[section. subsubsection. file:///C:/Users/Shashank Dixit/Downloads/sectioning ...subject]      [style=\ssc] \setuphead[subsection. using \sffamily will yield: edited Jun 13 '12 at 22:24 answered Jun 13 '12 at 17:31 Werner 135k 9 254 492 For completeness I'll give a ConTeXt solution also.