[Tex/LaTex] Formatting section titles

formattingsectioning

Forgive the stupid simplicity of this question, and please feel free to refer me to an older answer. I'm not quite familiar enough with LaTeX terminology to have found it.

All I want to do is set a different default format for my section titles. Instead of just being bolded and slightly larger than the main text, I'd like them to be of normal weight, the same size as the main text, and all caps.

I'm using the article class.

Best Answer

You can use the titlesec package:

\documentclass{article}
\usepackage{titlesec}
\usepackage{lipsum}

\titleformat{\section}
  {\normalfont\scshape}{\thesection}{1em}{}

\begin{document}

\section{Test Section}
\lipsum[1]

\end{document}

to use small caps for the section titles:

enter image description here

or

\documentclass{article}
\usepackage[explicit]{titlesec}
\usepackage{lipsum}

\titleformat{\section}
  {\normalfont}{\thesection}{1em}{\MakeUppercase{#1}}

\begin{document}

\section{Test Section}
\lipsum[1]

\end{document}

to use upper case for the section titles:

enter image description here

If you don't want to use the titlesec package, you can redefine the \section command, as implemented in article.cls; here's an example of such a redefinition to obtain section titles using small caps:

\documentclass{article}

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

\begin{document}

\section{Test Section}

\end{document}
Related Question