TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a thesis that has double spacing on by default throughout the document. However, captions on figures need to be singlepaced. I can do that like this

\normalsize \singlespace \caption{ bla bla bla}

where singlespace is defined as:


This gets old, so I want to redefine caption, which I did like this:


This works fine, but sometimes I want to specify the optional tablename for my list of tables. So I do this,


Unfortunately, this will default the table name to be empty. The behavior I really want is this:


...but latex complains about that.

Can anyone help me get caption redefined properly?

share|improve this question

migrated from stackoverflow.com May 5 '11 at 19:04

This question came from our site for professional and enthusiast programmers.

Instead of redefining the \caption macro in order to use a custom \singlespace macro, I would use the setspace package. It combines double-spacing for "normal" text with single-spacing for captions.








(The blindtext package is only used to add some dummy text to the example.)

share|improve this answer

Lockstep showed already a solution for singlespaced captions in doublespaced text. However, I would like to answer your specific question about redefining \caption in a way such that optional arguments are allowed.


With this code, if no optional argument has been given, #1 will be \shortcaption which is defined later to have the value of #2. If an optional argument has been given, this would be used and \shortcaption would simply be ignored.

share|improve this answer
just a quick note to say that I get a blank line appearing in the output if I don't have some more comments inside this macro to eat the whitespace. works great otherwise! – Sam Mason Oct 15 '13 at 11:25

You can use also the Caption package, which gives you many options to customize the captions of floating environments.

Just as an example, I used in my thesis the following command in the preamble:


which made all the captions to be printed with a smaller font than the document, with bold font, and with the hang option I indented them so that they hang after the first line of text.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.