# How to renewcommand the word-size in section titles?

I type \section{\Large Section title} to make the section title larger than what it originally appears. Please could you tell me how to achieve this effect by redefining the command \section uniformly, so that to larger the word-size in the section titles?

-
If you use KOMA-classes, you can use \setkomafont{section}{\Large} in your preamble. –  Dan H. Jul 21 '14 at 12:28
Thanks Dan! I am using the classical amsart class. –  kwgl Jul 21 '14 at 12:30
@kwgl: Redefining the \section command is tedious, since there is a \section* version too, and the \section[]{} version as well. –  Christian Hupfer Jul 21 '14 at 12:31
@ChristianHupfer: Well, thanks for sharing your opinion. It was a technical question that my friends preferred making the titles more distinguished from the contexts artificially. –  kwgl Jul 21 '14 at 12:35
@kwgl: Wait some minutes please, I will provide a small solution ;-) –  Christian Hupfer Jul 21 '14 at 12:36

Obviously, amsart has no support for \section[]{}, so it is not really necessary to define that, but for later uses perhaps;-)

It is not a good idea to add something like \section{\Large My sophisticated Title}, since this leads to a large text entry on the TOC, which looks awkward.

In my opinion, both section title and the number should be scaled if \large etc. is applied, so I put the font change in \begingroup...\endgroup pair within the redefinition.

The actual font change is done in the \sectionstartuphook command, however, other commands can be put there as well.

If the tradiditional \section is requested, either call a copy, i.e. \LaTeXStandardSection as usual or say \let\section\LaTeXStandardSection, however, this will destruct the earlier redefined version. The first method is used for the 3rd section in the example.

\documentclass{amsart}
\usepackage{blindtext}

\let\LaTeXStandardSection\section%

\newcommand{\sectionstartuphook}{\LARGE}

\makeatletter
\newcommand{\unstarredsection@@noopt}[1]{%
\unstarredsection@@opt[#1]{#1}%
}%

\newcommand{\unstarredsection@@opt}[2][]{%
\begingroup%
\sectionstartuphook%
\LaTeXStandardSection[#1]{#2}%
\endgroup%
}%

\newcommand{\starredsection}[1]{%
\begingroup%
\sectionstartuphook%
\LaTeXStandardSection*{#1}%
\endgroup%
}%

\newcommand{\unstarredsection}{%
\@ifnextchar[{\unstarredsection@@opt}{\unstarredsection@@noopt}%
}%

\renewcommand{\section}{%
\@ifstar{\starredsection}{\unstarredsection}%
}%

\begin{document}
\tableofcontents

\section{First}
\blindtext
\clearpage
\section*{Two}
\blindtext
\clearpage

\LaTeXStandardSection{Three}%
\blindtext

\end{document}


-
Thank you Christian! Now I got understood why you said it is "tedious". The code helps us! –  kwgl Jul 21 '14 at 12:58
It's much easier with titlesec –  Bernard Jul 21 '14 at 13:51
@Bernard titlesec is not compatible with AMS document classes. –  Gonzalo Medina Jul 21 '14 at 14:07
@Bernard: I would agree with you, but see Gonzalo Medina's comment –  Christian Hupfer Jul 21 '14 at 14:12
\section in amsart is defined via \@startsection so it does have support for the *-form and the optional argument. –  egreg Jul 21 '14 at 14:26

It's actually quite easy (although I don't like it). The amsart class uses the standard \@startsection command, so it's just copying the relevant code from amsart.cls and adding \large where necessary. Oh, and \Large is really too much.

I changed also \specialsection and \contentsnamefont for uniformity.

\documentclass{amsart}
\usepackage{blindtext}

\makeatletter
\def\specialsection{\@startsection{section}{1}%
\z@{\linespacing\@plus\linespacing}{.5\linespacing}%
\def\section{\@startsection{section}{1}%
\z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%
\makeatother

\begin{document}
\tableofcontents

\section*{Introduction}
\blindtext

\section{Preliminary results}
\blindtext

\end{document}


-
Just to be nitpicking: it's not exactly the standard (as in the one in the kernel) \@startsection, since amsart defines its own version. –  Gonzalo Medina Jul 21 '14 at 14:36
@GonzaloMedina Well, the idea is just the same, isn't it? The changes are about putting starred section in the table of contents anyway and they don't affect the meaning of the arguments to \@startsection. –  egreg Jul 21 '14 at 14:38
Of course it's the same; I didn't say otherwise, did I? –  Gonzalo Medina Jul 21 '14 at 14:41
@egreg: I appreciate your solution, but does \section[shorttitle]{longtitle} really work? I tried with non-redefined sections from amsart.cls` and it does not work. –  Christian Hupfer Jul 21 '14 at 14:41
@ChristianHupfer Of course it works. However, the AMS classes don't use the short title in the TOC (which was a wrong decision by the standard classes), but just for the headers, if such headers appear, of course. –  egreg Jul 21 '14 at 14:47