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.

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}
\setafterSskip{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?

share|improve this question
1  
@Herbert, @Alan: Three answers from different persons within 26 seconds is not too bad. ;-) –  lockstep Feb 27 '11 at 13:42
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
    
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
1  
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
add comment

you have to replace the S with sec, subsec aso. eg:

\documentclass{memoir}
\setbeforesecskip{1ex}
\setaftersecskip{1ex}
\begin{document}
test
\end{document}
share|improve this answer
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.