[Tex/LaTex] Automatic Capitalization of sectioning headings

capitalizationsectioning

Is there anyway to make LaTeX automatically capitalize sectioning headings?

That is, I would like this to generate a capitalized headline:

\documentclass{article}
\begin{document}
\section{This should be in title case.}
But it isn't.
\end{document}

Best Answer

Another solution, using any additional package, it to modify the \section, \subsection etc. macros. It can be done fairly easily with the following

\makeatletter
\renewcommand{\section}{\@startsection {section}{1}{\z@}%
             {-3.5ex \@plus -1ex \@minus -.2ex}%
             {2.3ex \@plus .2ex}%
             {\normalfont\Large\scshape\bfseries}}

\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}%
             {-3.25ex\@plus -1ex \@minus -.2ex}%
             {1.5ex \@plus .2ex}%
             {\normalfont\large\scshape\bfseries}}

\renewcommand{\subsubsection}{\@startsection{subsubsection}{2}{\z@}%
             {-3.25ex\@plus -1ex \@minus -.2ex}%
             {1.5ex \@plus .2ex}%
             {\normalfont\normalsize\scshape\bfseries}}
\makeatother

The title of the section, subection and subsubsection will then be in small caps.