The caption package^{∗}

Harald Axel Sommerfeldt

axel@hp1.ang-physik.uni-kiel.de Harald Sommerfeldt @ W (MausNet)

1995/10/09

Abstract The caption package provides many ways to customise the captions in

     floating environments such figure, table, sidewaysfigure, and sidewaystable.

The following L^{A}TEX 2ε packages are supported: float, longtable, and subfigure. But it works fine with the following packages as well: floatfig, rotating, supertabular, and wrapfig.

1 Documentation? What documentation?

I’m sorry to say this, but there is no documentation provided with the new version of this package, yet. And it’s still beta. I hope I can eleminate both circumstances in the near future; at the moment my spare time is very very very limited, so I decided to make this beta public. This new version is nearly compatible with the lastest official release (version 1.4b), so you can use the old documentation so far. Here is what differs this version from version 1.4b:

• If the caption package will detect a loaded float package, it will not redefine the boxed style of floats anymore. If you want to have the old behaviour, you have to specify the new option boxed to the caption2 package.

• Anything said about the subfigure package in the old doc isn’t true anymore; the caption package is now adapted to the new version 2.0 of this package. Especially the caption package will not redefine \@thesubfigure and \@thesubtable anymore and it will not set \subcapsize – you have to do this now for yourself if you want to, e.g. with the following code:

         \usepackage[normalsize]{subfigure}
         \usepackage[large]{caption}

∗This package has version number 2.0(BETA), last revised 1995/10/09.

So you can load the caption2 package before loading the subfigure package now without problems, in fact this is recommend now. Don’t care about what the old doc or the doc of the subfigure package is telling you!

As a summary, the new caption package won’t lead into different results of your documents just because of loading it (without options). If you are really interested in the (many!) new features of this totally rewritten package, take a look in the provided test document (test2.tex) to get a idea of the new commands and possibilities. And feel yourself free to write a email to me, if any questions occur.

1.1 Just a few notes…

If you use the new command \setcaptionwidth to set the absolut width of a caption, you are not allowed to change \captionmargin anymore! Instead, use the new command \setcaptionmargin to do this. Longtables will still take care of \LTcapwidth, even if you are setting your own

width via \setcaptionwidth or \setcaptionmargin. To get rid of this, use the

following code just after loading the caption2 package:

     \dummycaptionstyle{longtable}{}

or just specify the new package option longtable. This package was developed and tested with following versions of the other packages:

package version date
float 1.2c 1995/03/29
longtable 3.15  1995/06/15
rotating 2.9  1995/04/07
subfigure 2.0  1995/03/06

Maybe it will work with older versions, maybe not… BTW: If you are interested in rotated versions (like sidewaysfigure or sidewaystable) of new floats (defined with the float package), take a look at the rotfloat package, which comes from a very talented young man with a very german style of writing english docs (if he ever writes any!) and a very big mouth - myself :-)

2 Thanks

I would like to thank David Carlisle for his help writing the longtable support; without the changes in his package this wouldn’t become possible.

References

[1] Anselm Lingnau: An Improved Environment for Floats, 1995/03/25

[2] Sebastian Rahtz and Leonor Barroca: A style option for rotated objects in L^{A}TEX, 1994/10/02

[3] Harald Axel Sommerfeldt: The rotfloat package, 1995/03/30

[4] Steven Douglas Cochran: The subfigure package, 1995/03/06

[5] Michel Goossens, Frank Mittelbach and Alexander Samarin: The L^{A}TEX Companion, Addison-Wesley, Reading, Massachusetts, 1994.

[6] Anne Brüggemann-Klein: Einführung in die Dokumentverarbeitung, B.G. Teubner, Stuttgart, 1989

[7] Helmut Kopka: L^{A}TEX– Erweiterungsmöglichkeiten, 3. überarbeitete Auflage, Addison-Wesley, Bonn, 1991

Change History

v1.0

General: First release . . . . . . . . . . 1 v1.1

General: New captiontype:

centerlast . . . . . . . . . . . . . . 2 v1.2

General: Support of the float package . . . . . . . . . . . . . . . . . . . . . 2 Works now with the figure* and table* environments, too …. 1

v1.3

   General: Support of \captionlabelfont

in subcaptions . . . . . . . . . . . . 2 v1.4

General: \captionsize changed to \captionfont . . . . . . . . . . . . . 2 New option: nooneline . . . . . . 2

v1.4b

General: Adapted to version 2.8 of

the rotating package . . . . . . . . 2 v2.0

General: support of the longtable package . . . . . . . . . . . . . . . . . 2 Totally rewritten; many new commands and features . . . . . . 1