Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

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}​
share|improve this answer
    
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
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 3 '12 at 23:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.