Automatic Capitalization of sectioning headings?
sectsty
provides easy hooks into sectional units. \MakeUppercase
turns the title into UPPERCASE, while \titlecap
(from titlecaps
) turns it into Title Case.
\documentclass{article}
\usepackage{sectsty}% http://ctan.org/pkg/sectsty
\usepackage{titlecaps}% http://ctan.org/pkg/titlecaps
\begin{document}
\tableofcontents
\sectionfont{\MakeUppercase}
\section{This should be in upper case}
It is!
\sectionfont{\titlecap}
\section{This should be in title case}
It is!
\end{document}
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.