# How do I change subsection labeling?

The following code produces 1 next to Foo and 1.1 next to Bar.

\section{Foo}
\subsection{Bar}


How do I produce 1 next to Foo and 1a next to Bar? And 1b for the next subsection, and so on?

-

You have to change the number printing mechanism for \subsection. Easiest is to use:

\renewcommand{\thesubsection}{\thesection\alph{subsection}}


\documentclass{article}
\renewcommand{\thesubsection}{\thesection\alph{subsection}}
\begin{document}
\section{A section}
\subsection{A subsection}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}​

-
Thank you, it works great! Why is it \thesubsection and \thesection though? Why prefix it with the? –  David Faux Oct 3 '12 at 23:34
@DavidFaux: See The \the command \thesection refers to the printing of the section counter, which is internally represented in a different way to what you see. The default is \arabic{<counter>}. –  Werner Oct 3 '12 at 23:37