I am using my figures and tables both in report documents, where I want them to have caption text, an in presentations made with Beamer, where I want them to not have a caption text. I am using the Caption package (2011/08/11) both for my report and presentations.

Is there a simple way to turn off the caption text when I use the figures and tables in my presentations?

  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It is considered a lot better to put in some code that will compile, as it makes it a lot easier for us to copy it into our text editor and work with it, and see exactly what it is you are trying to do. – Stephan Lehmke Nov 28 '12 at 10:54
  • 2
    How about \DeclareCaptionFormat{empty}{}\captionsetup{format=empty}? – cgnieder Nov 28 '12 at 10:55
  • Thanks:) but when I put that string in the preamble I get this: ! Undefined control sequence. l.21 \DeclareCaptionFormat {empty}{}\captionsetup{format=empty} – myotis Nov 28 '12 at 11:03
  • 2
    They are provided by the caption package (which you said you're using) so you need to put it after \usepackage{caption} – cgnieder Nov 28 '12 at 11:07
  • It works fine !! (I forgot to put the \DeclareCaptionFormat string AFTER the \usepackage{caption} command . – myotis Nov 28 '12 at 11:12

Since you're using the caption package already you can use its possibilites to define own caption formats to define one that outputs nothing by saying


You can now use this format by setting it with \captionsetup:


A complete example:


 some figure
 \caption{some caption}


As noted by Axel Sommerfeldt in the comments it is probably a good idea also to set the skip above and below the caption to zero. Otherwise you might wonder where the vertical space below the figure comes from... For this just extend the caption setup:

| improve this answer | |
  • 1
    I would set the skips above and below the caption to 0pt additionally, i.e. \captionsetup{format=empty,aboveskip=0pt,belowskip=0pt} – user2574 Nov 29 '12 at 9:10
  • @Axel Good point! – cgnieder Nov 29 '12 at 9:24
  • If the same document is producing the article and beamer versions you might want to put the caption formatting commands inside \mode<presentation>{...}. – Andrew Stacey Nov 29 '12 at 10:07
  • @Andrew true, but I thought that wouldn't be too hard to figure out if one already is using one document for both :) – cgnieder Nov 29 '12 at 10:24

(For reference, without any package.) Put this into your preamble:


or even simpler (credit to Andrew):

\renewcommand \caption [2][]{}
| improve this answer | |
  • 2
    \renewcommand{\caption}[2][]{} – Andrew Stacey Nov 29 '12 at 10:06
  • @AndrewStacey Damn those LaTeXy smarties! – yo' Nov 29 '12 at 10:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.