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?


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.

| 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

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.)

| improve this answer | |

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy