3

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?

David Faux
  • 4,117

1 Answers1

5

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

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

enter image description here

\documentclass{article}
\renewcommand{\thesubsection}{\thesection\alph{subsection}}
\begin{document}
\section{A section}
\subsection{A subsection}
\subsection{A subsection}
\subsubsection{A subsubsection}
\end{document}​
Werner
  • 603,163
  • Thank you, it works great! Why is it \thesubsection and \thesection though? Why prefix it with the? – David Faux Oct 03 '12 at 23:34
  • 1
    @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 03 '12 at 23:37