# How to enumerate subsections

Can anyone tell me how to enumerate \subsections? For example:

\subsection{Double-space a file.}
...
\subsection{Triple-space a file.}
...


I want this to look like:

1.1 Double-space a file.
...
1.2 Triple-space a file.
...


At the moment I only get this:

Double-space a file.
...
Triple-space a file.
...

-
This is unexpected behavior for the default setting. Perhaps you included something at the preamble that you didn't show. Minimal working example (see meta.tex.stackexchange.com/questions/228/…) will be very helpful. – ipavlic Apr 29 '11 at 11:56
ipavlic, what do you mean it's unexpected behavior? I think you misunderstood the question - I want the subsections to be numbered. That's all. – Peteris Krumins Apr 29 '11 at 12:07
If you just compile a minimal document like \documentclass{article} \begin{document} \section{Section} \subsection{Subsection} \end{document} your output will look like this 1 Section 1.1 Subsection. Therefore, you have included something to your document that changed the default behavior. Had you included a MWE you would have most likely found the culprit yourself, or would have made it possible for us to try help you better. – ipavlic Apr 29 '11 at 12:24

You can set the level until which (sub)sections are numbered by setting the counter secnumdepth. \setcounter{secnumdepth}{whatever}

-
I just tried this but it didn't change the result, I still get unnumbered subsections. I did: \setcounter{subsection}{1}. – Peteris Krumins Apr 29 '11 at 12:12
I am writing a \documentclass{memoir} btw. – Peteris Krumins Apr 29 '11 at 12:14
@Peteris: I think you misunderstand the answer. You should change the value of secnumdepth (to 2 or larger), not subsection. – Leo Liu Apr 29 '11 at 12:18
@Raphink memoir provides its own methods for changing sections; although titlesec can be used with memoir, it's preferable not to. – Alan Munn Apr 29 '11 at 12:32
@Raphink memoir incorporates a lot of packages within the class directly: abstract, appendix, array, booktabs, ccaption, chngcntr, crop, dcolumn, delarray, enumerate, epigraph, ifmtarg, ifpdf, index, makeidx, moreverb, needspace, newfile, nextpage, pagenote, patchcmd, parskip, setspace, shortvrb, showidx, tabularx, titleref, tocbibind, tocloft, verbatim so you should be careful recommending packages to memoir users. – Alan Munn Apr 29 '11 at 12:40

For memoir class the easier syntax is \setsecnumdepth{argument} (section 6.3 in the manual). In your case you would use

\setsecnumdepth{subsection}


\maxtocdepth{subsection}