How can I contain the numbering of subsections to a section?

I have a document where I want the subsections of a section to be self contained so I can have a structure like this:

a

b

c

a

b

c

At the moment I have a document structured like this:

\documentclass[12pt, titlepage]{article}
\begin{document}

\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\alph{subsection}}
\renewcommand\thesubsubsection{\roman{subsubsection}}

\section*{Question 1}
\subsection{}
\subsection{}
\subsection{}
\section*{Question 2}
\subsection{}
\subsection{}
\subsection{}

\end{document}


Which results in the \subsections numbering carrying through to give something like

Question 1

a

b

c

Question 2

d

e

f

How can I prevent this from happening? Also is there a way to format the numbering at all so instead of it just being "a" make it "(a)"?

-

The second part of your question to change the number formatting just requires the addition of the braces in:

\renewcommand\thesubsection{(\alph{subsection})}


The reason the subsection numbers are not being reset is that you are using \section*. So, here is one not so automated way to fix that: Use \setcounter{subsection}{0} to reset the subsection counter:

\documentclass[12pt, titlepage]{article}
\begin{document}

\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{(\alph{subsection})}
\renewcommand\thesubsubsection{\roman{subsubsection}}

\section*{Question 1}
\subsection{}
\subsection{}
\subsection{}

\section*{Question 2}\setcounter{subsection}{0}
\subsection{}
\subsection{}
\subsection{}

\end{document}


Alternatively, you could simply use \section instead of \section*:

\documentclass[12pt, titlepage]{article}
\begin{document}

\renewcommand\thesection{Question \arabic{section}}
\renewcommand\thesubsection{(\alph{subsection})}
\renewcommand\thesubsubsection{\roman{subsubsection}}

\section{}
\subsection{}
\subsection{}
\subsection{}

\section{}
\subsection{}
\subsection{}
\subsection{}

\end{document}

-
If I were to use \section{} instead of \section*{Question one} then I would get output like: 1 Question one, which looks kind of weird? –  Aesir Oct 18 '11 at 21:20
Then the first method would work for you. Or use \renewcommand\thesection{Question}. –  Peter Grill Oct 18 '11 at 21:21
Variant 2 is beautiful -- as long as there's no need ever for section headers other than "Question x. :-) –  Mico Oct 18 '11 at 21:22
Cool, thanks a lot for your help on this. –  Aesir Oct 18 '11 at 21:28