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.

What are the advantages to using \bigskip, \medskip, and \smallskip instead of just using \vspace{somelength}?

share|improve this question

1 Answer 1

up vote 38 down vote accepted

Flexibility.

\show\bigskip

reveals that \bigskip expands to \vspace{\bigskipamount} so in terms of functionality, there's no difference. However, if after typing a 110 page thesis, you realise that the limit for length set by your university is 100 pages, then simply redefining \bigskipammount might get you your extra 10 pages in one fell swoop, rather than having to go through and considering each individual \vspace and remembering why it was there.

In general, a good rule is that commands should carry contextual information. So even though \(\vec{x}\) and \(\overline{x}\) might look the same, \(\vec{x}\) should always be used for vectors and for nothing else. So that when that Big Shot Journal says "House style is that all vectors are purple with yellow dots", a simple \renewcommand{\vec}[1]{\color{purple with yellow dots}#1} does the trick without messing up any of the rest of the document.


Edit: (in response to vanden's request in the comments)

Of course, \bigskipamount is a length and in TeX, lengths can be a bit complicated: they don't have to be exact measurements but can include a little flexibility. Examining latex.ltx reveals that, unless further modified, \bigskipamount (and the others) are defined to be:

\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
\newskip\medskipamount   \medskipamount  =6pt plus 2pt minus 2pt
\newskip\bigskipamount   \bigskipamount =12pt plus 4pt minus 4pt

Hopefully, the meaning of the syntax is clear. Thus if you are redefining \bigskipamount then it's good practice to also include a little flexibility.

If this is new to someone, it's worth knowing that such lengths are called rubber lengths and the extra bit is known as glue so those are the words to look out for in the documentation. (Hope I've gotten that bit right; certainly those two words are associated with this concept.)

Moral of the Story: Flexibility's what you need.

(Probably only people of my generation who grew up in Britain will have a hope of getting the reference there)

share|improve this answer
    
Typo: \bigskipamount (only one 'm') –  qbi Jul 28 '10 at 14:47
    
Thanks! That's one problem with these conjoined macros: it's hard to spell-check them. –  Loop Space Jul 28 '10 at 15:07
4  
+1 for the first paragraph, but I wish I could give another upvote for the second paragraph. –  Mark Meckes Jul 28 '10 at 15:13
    
What Mark said. –  vanden Jul 28 '10 at 15:44
1  
@vanden: Thanks! (You're not a Goon Show fan by any chance?) –  Loop Space Jul 29 '10 at 12:59

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.