9

I want to make all section headings in LaTeX document bigger by a given scale. For example, I want all of them have 150% of size that they have now.

Can I do that somehow? (Ideally using sectsty)

8

The solution with sectsty should be

\documentclass{article}
\usepackage{relsize}
\usepackage{sectsty}

\allsectionsfont{\larger[2]} 

\begin{document}
\section{Section title}
\subsection{Subsection title}
\end{document}

I wouldn't recommend it. The size of section titles in the standard classes is already quite large.

  • OK, the error was my mistake. It seems like it worked, thanks! – Karel Bílek Aug 15 '12 at 21:47
  • Even though I've posted my own solution, this one is obviously better. – yo' Aug 15 '12 at 21:50
  • @tohecz: I actually have some more changes to the font, using \sectsty, which is making it appear too small, that's why I asked for \sectsty specifically. Thanks for your answer though – Karel Bílek Aug 15 '12 at 22:05
6

I don't know the package sectsty, but the following dirty trick using titlesec should work. Just add these lines into your preamble (and do not use sectsty at the same time...):

\usepackage{titlesec}
\usepackage{relsize}
\titlelabel{\larger\larger\thetitle\quad\aftergroup\larger\aftergroup\larger}

The trick is that \larger multiplies the current font size by 1.2 (in most cases). Applied twice it makes 1.44, which is very close to 1.5. The command \titlelabel change the way how the section numbers are printed. The sequence \aftergroup\larger makes sure that the magnification is applied to the section title as well.

  • [cz] Mimochodem, zdravím :) – yo' Aug 15 '12 at 21:28
  • Is there any way to apply this to just the section titles, not the subsection titles? – supercoolphysicist Apr 23 '15 at 10:09
  • @supercoolphysicist If you want it only for one title type, you should really modify this one title type in the standard way the package offers. Just read its documentation. – yo' Apr 23 '15 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.