Whitespace in memoir titles

I am unhappy about the whitespace before and after my chapters, sections, and subsections etc.

Using the memoir class I tried to find out on how to reduce this.

For my chapters it says I should use the \beforechapskip and \afterchapskip commands. For my sections \setbeforeSskip and afterskip (i think).

This must be very stupid, but I tried to change these but I must be doing it wrong. In this example

\documentclass{memoir}
\setbeforeSskip{1ex}
\begin{document}
test
\end{document}


I get this error: ! Undefined control sequence. Like I said, it's probably easy but im just not very good at these things and i have no idea what I am doing wrong.

Could anyone provide me a small example of how to set the whitespace for chapters and sections etc?

-
@Herbert, @Alan: Three answers from different persons within 26 seconds is not too bad. ;-) –  lockstep Feb 27 '11 at 13:42

From the memoir manual section 6.6:

In the following I will use S to stand for one of sec, subsec, subsubsec, para or subpara, which are in turn shorthand for section through to subparagraph, as summarised in Table 6.3.

\setbeforeSskip{<skip>}


Table 6.3: Values for S in section styling macro names.

sec subsec subsubsec para subpara

So you need to replace S with the appropriate value: (for sections, sec):

\documentclass{memoir}
\setbeforesecskip{1ex}
\setaftersecskip{1ex}
\begin{document}
test
\end{document}


There are a number of other places where the memoir manual uses this kind of scheme; it often trips people up.

-
If you add the page number (and possibly the enclosed code snippet) to your quote, I'll delete my answer. –  lockstep Feb 27 '11 at 13:44
@lockstep. I added a reference to the section instead of a page number. In my memman the relevant page is p. 100. Not sure why the discrepancy. –  Alan Munn Feb 27 '11 at 13:53
Gosh i feel SO stupid now, thx folks! –  Toroo Feb 27 '11 at 14:25
Don't feel stupid: because (1) memoir, though excellent, has some obscure bits like the way it explains what you tripped over; and (2) the only stupid questions are the ones you don't ask because you feel shy... –  Brent.Longborough Feb 27 '11 at 15:24
you have to replace the S with sec, subsec aso. eg:
\documentclass{memoir}