Test of the caption package

Harald Axel Sommerfeldt

October 21, 1997

Contents

1 Comparison with L^{A}TEX’s captions 2

2 Predefined caption styles 3

3 \captionwidth  4

4 The option ‘nooneline’ 5

5 Twocolumn floats 6 5.1 Blah . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

6 User-defined captions styles 8

7 The float package 9 7.1 Without caption package . . . . . . . . . . . . . . . . . . . . . . . 9 7.2 With caption package . . . . . . . . . . . . . . . . . . . . . . . . 10 7.3 … and with captionstyle ‘indent’ . . . . . . . . . . . . . . . . . . 11 7.4 Redefined caption styles . . . . . . . . . . . . . . . . . . . . . . . 12 7.5 The option ‘boxed’ . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7.6 The option ‘ruled’ . . . . . . . . . . . . . . . . . . . . . . . . . . 13 7.7 User-defined float styles . . . . . . . . . . . . . . . . . . . . . . . 13

8 The longtable package 14 8.1 Without caption package . . . . . . . . . . . . . . . . . . . . . . . 14 8.2 With caption package . . . . . . . . . . . . . . . . . . . . . . . . 14

9 The subfigure package 16 9.1 Without caption package . . . . . . . . . . . . . . . . . . . . . . . 16 9.2 With caption package . . . . . . . . . . . . . . . . . . . . . . . . 17 9.3 … and with subcapstyle ‘hang’ . . . . . . . . . . . . . . . . . . . 18

10 Reported errors 19

1 Comparison with L^{A}TEX’s captions

L^{A}TEX CAPTION

Figure 1: This is a short L^{A}TEX caption.

L^{A}TEX CAPTION

Figure 2: This is a L^{A}TEX caption. This is a L^{A}TEX caption. This is a L^{A}TEX caption. This is a L^{A}TEX caption. This is a L^{A}TEX caption. This is a L^{A}TEX caption.

Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text.

CAPTION CAPTION

Figure 3: This is a short caption caption.

CAPTION CAPTION

Figure 4: This is a caption caption. This is a caption caption. This is a caption caption. This is a caption caption. This is a caption caption. This is a caption caption.

Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text. Here comes some text.

2 Predefined caption styles

NORMAL CAPTION

Figure 5. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption.

CENTER CAPTION

Figure 6. This is a center caption. This is a center caption. This is a center caption. This is a center caption. This is a center caption. This is

a center caption.

FLUSHLEFT CAPTION

Figure 7. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption.

FLUSHRIGHT CAPTION

Figure 8. This is a flushright caption. This is a flushright caption. This

is a flushright caption. This is a flushright caption. This is a flushright caption. This is a flushright caption.

CENTERLAST CAPTION

Figure 9. This is a centerlast caption. This is a centerlast caption. This is a centerlast caption. This is a centerlast caption. This is a centerlast

caption. This is a centerlast caption.

HANG CAPTION

Figure 10. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption.

INDENT CAPTION

Figure 11. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption.

3 \captionwidth

NORMAL CAPTION

Figure 12. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption. This is a normal caption.

CENTER CAPTION

Figure 13. This is a center caption. This is a center caption. This is a center caption. This is a center caption. This is a center caption. This is a

center caption.

FLUSHLEFT CAPTION

Figure 14. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption. This is a flushleft caption.

FLUSHRIGHT CAPTION

Figure 15. This is a flushright caption. This is a flushright caption. This

is a flushright caption. This is a flushright caption. This is a flushright caption. This is a flushright caption.

CENTERLAST CAPTION

Figure 16. This is a centerlast caption. This is a centerlast caption. This is a centerlast caption. This is a centerlast caption. This is a centerlast

caption. This is a centerlast caption.

HANG CAPTION

Figure 17. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption. This is a hang caption.

INDENT CAPTION

Figure 18. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption. This is a indent caption.

4 The option ‘nooneline’

NORMAL CAPTION

Figure 19. This is a short normal caption.

CENTER CAPTION

Figure 20. This is a short center caption.

FLUSHLEFT CAPTION

Figure 21. This is a short flushleft caption.

FLUSHRIGHT CAPTION

Figure 22. This is a short flushright caption.

CENTERLAST CAPTION

Figure 23. This is a short centerlast caption.

HANG CAPTION

Figure 24. This is a short hang caption.

INDENT CAPTION

Figure 25. This is a short indent caption.

5 Twocolumn floats

5.1 Blah

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

TWOCOLUMN CAPTION

Figure 26. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah

TWOCOLUMN CAPTION

Figure 27. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption. This is a twocolumn caption.

blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah.

6 User-defined captions styles

FANCY CAPTION

Figure 28 This is a short fancy caption.

FANCY CAPTION

Figure 29 This is a fancy caption. This is a fancy caption. This is a fancy caption. This is a fancy caption. This is a fancy caption. This is a fancy caption.

ANOTHER FANCY CAPTION

Figure 30: This is a short another fancy caption.

ANOTHER FANCY CAPTION

Figure 31 This is a another fancy caption. This is a another fancy caption. This is a another fancy caption. This is a another fancy caption. This is a another fancy caption. This is a another fancy caption.

7 The float package

7.1 Without caption package

     \floatstyle{ruled}
     \newfloat{Program}{tbp}{lop}[section]

… loads o’ stuff …

     \begin{Program}
     \begin{verbatim}

… program text …

     \end{verbatim}

\caption{… caption … }

     \end{Program}

Example 7.1: This is another silly floating Example. Except that this one doesn’t actually float because it uses the [H] optional parameter to appear Here. (Gotcha.)

Program 7.1 The first program. This hasn’t got anything to do with the style but is included as an example. Note the ruled float style.

#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
printf("argv[%d] = %s\n", i, argv[i]);
return 0;
}

\begin{matrix}n & \binom{n}{0} & \binom{n}{1} & \binom{n}{2} & \binom{n}{3} & \binom{n}{4} & \binom{n}{5} & \binom{n}{6} & \binom{n}{7} \\ 0 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 3 & 1 & 3 & 3 & 1 \\ 4 & 1 & 4 & 6 & 4 & 1 \\ 5 & 1 & 5 & 10 & 10 & 5 & 1 \\ 6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 7 & 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \end{matrix}

Table 1: Pascal’s triangle. This is a re-styled L^{A}TEX table.

7.2 With caption package

     \floatstyle{ruled}
     \newfloat{Program}{tbp}{lop}[section]

… loads o’ stuff …

     \begin{Program}
     \begin{verbatim}

… program text …

     \end{verbatim}

\caption{… caption … }

     \end{Program}

Example 7.2: This is another silly floating Example. Except that this one doesn’t actually float because it uses the [H] optional parameter to appear Here. (Gotcha.)

Program 7.2 The first program. This hasn’t got anything to do with the style but is included as an example. Note the ruled float style.

#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
printf("argv[%d] = %s\n", i, argv[i]);
return 0;
}

\begin{matrix}n & \binom{n}{0} & \binom{n}{1} & \binom{n}{2} & \binom{n}{3} & \binom{n}{4} & \binom{n}{5} & \binom{n}{6} & \binom{n}{7} \\ 0 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 3 & 1 & 3 & 3 & 1 \\ 4 & 1 & 4 & 6 & 4 & 1 \\ 5 & 1 & 5 & 10 & 10 & 5 & 1 \\ 6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 7 & 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \end{matrix}

Table 2: Pascal’s triangle. This is a re-styled L^{A}TEX table.

7.3 … and with captionstyle ‘indent’

     \floatstyle{ruled}
     \newfloat{Program}{tbp}{lop}[section]

… loads o’ stuff …

     \begin{Program}
     \begin{verbatim}

… program text …

     \end{verbatim}

\caption{… caption … }

     \end{Program}

Example 7.3. This is another silly floating Example. Except that this one doesn’t actually float because it uses the [H] optional parameter to appear Here. (Gotcha.)

Program 7.3 The first program. This hasn’t got anything to do with the style but is included as an example. Note the ruled float style.

#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
printf("argv[%d] = %s\n", i, argv[i]);
return 0;
}

\begin{matrix}n & \binom{n}{0} & \binom{n}{1} & \binom{n}{2} & \binom{n}{3} & \binom{n}{4} & \binom{n}{5} & \binom{n}{6} & \binom{n}{7} \\ 0 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 3 & 1 & 3 & 3 & 1 \\ 4 & 1 & 4 & 6 & 4 & 1 \\ 5 & 1 & 5 & 10 & 10 & 5 & 1 \\ 6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 7 & 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \end{matrix} Table 3. Pascal’s triangle. This is a re-styled L^{A}TEX table.

7.4 Redefined caption styles

The first program. This hasn’t got anything to do with the style but is included as an example. Note the ruled float style.

#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
printf("argv[%d] = %s\n", i, argv[i]);
return 0;
}

\begin{matrix}n & \binom{n}{0} & \binom{n}{1} & \binom{n}{2} & \binom{n}{3} & \binom{n}{4} & \binom{n}{5} & \binom{n}{6} & \binom{n}{7} \\ 0 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 3 & 1 & 3 & 3 & 1 \\ 4 & 1 & 4 & 6 & 4 & 1 \\ 5 & 1 & 5 & 10 & 10 & 5 & 1 \\ 6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 7 & 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \end{matrix} Table 4. Pascal’s triangle. This is a re-styled L^{A}TEX table.

7.5 The option ‘boxed’

\begin{matrix}n & \binom{n}{0} & \binom{n}{1} & \binom{n}{2} & \binom{n}{3} & \binom{n}{4} & \binom{n}{5} & \binom{n}{6} & \binom{n}{7} \\ 0 & 1 \\ 1 & 1 & 1 \\ 2 & 1 & 2 & 1 \\ 3 & 1 & 3 & 3 & 1 \\ 4 & 1 & 4 & 6 & 4 & 1 \\ 5 & 1 & 5 & 10 & 10 & 5 & 1 \\ 6 & 1 & 6 & 15 & 20 & 15 & 6 & 1 \\ 7 & 1 & 7 & 21 & 35 & 35 & 21 & 7 & 1 \end{matrix} Table 5. Pascal’s triangle. This is a re-styled L^{A}TEX table.

7.6 The option ‘ruled’

Program 7.5. The first program. This hasn’t got anything to do with the style but is

included as an example. Note the ruled float style.

#include <stdio.h>
int main(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
printf("argv[%d] = %s\n", i, argv[i]);
return 0;
}

7.7 User-defined float styles

This is the start! A very fancy float

This is the middle!

Fancyfl 7.1

This is a very fancy caption. This is a very fancy caption. This is a very fancy caption. This is a very fancy caption. This is a very fancy caption.

This is a very fancy caption.

This is the end!

8 The longtable package

8.1 Without caption package

Table 6: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

8.2 With caption package

Table 8: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

Table 10. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test

Test Test

Longtable: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

Longtable: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

Longtable: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

Longtable: This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption. This is a longtable caption.

Test Test
Test Test

9 The subfigure package

9.1 Without caption package

(a) First  (b) Second Figure

(c) Third

Figure 32: Three subfigures.

Figure 32 contains two top ‘subfigures’ and Figure 32(c).

33.1: First  {33.2: Sec- \atop ond}

Figure 33: Two subfigures.

See subfigures 33.1 and 33.2.

9.2 With caption package

(a) First  (b) Second Figure

(c) Third

Figure 34: Three subfigures.

Figure 34 contains two top ‘subfigures’ and Figure 34(c).

35.1: First  {35.2: Sec- \atop ond}

Figure 35: Two subfigures.

See subfigures 35.1 and 35.2.

9.3 … and with subcapstyle ‘hang’

(a) First  (b) Second Figure

(c) Third

Figure 36: Three subfigures.

Figure 36 contains two top ‘subfigures’ and Figure 36(c).

37.1: First  37.2: Second

Figure 37: Two subfigures.

See subfigures 37.1 and 37.2.

10 Reported errors

This figure is labeled correctly. Figure 38: “A sobering thought, Eileen: What if, right at this very moment I

*am* living up to my full potential?” – Jane Wagner

This figure is not – the difference is the \label command Figure 39: “A sobering thought, Eileen: What if, right at this very moment I

*am* living up to my full potential?” – Jane Wagner