{captions} is about captions for figures, tables and other, custom-defined floats or non-floating illustrations which are formatted to look identical to these floats. A popular package is caption.

learn more… | top users | synonyms

113
votes
2answers
186k views

Force figure placement in text

I have a problem when a lot of figures are in question. Some figures tend to "fly around", that is, be a paragraph below, although I placed them before that paragraph. I use code: \begin{figure}[ht] ...
63
votes
10answers
44k views

Using \footnote in a figure's \caption

Maybe this is an easy one, but I struggled with this now too long :) I want to have a footnote in a caption of a figure, see the example. \begin{figure}[!ht] \caption{a figure ...
63
votes
3answers
21k views

subcaption vs. subfig: Best package for referencing a subfigure

On this question a comment by Martin H says, that one should forget about the subfigure and subfig packages and use subcaption. As subfig replaces subfigure, no argument there. I am currently using ...
55
votes
4answers
17k views

Why should a table caption be placed above the table?

In the papers I read the caption in figure floats is placed below the figure and in table floats the caption is placed above the table. I recognize that this is a common style that a lot of people ...
46
votes
3answers
37k views

Change the font of figure captions

I would like to italicize my figure captions and make them smaller. How can I do that?
33
votes
2answers
2k views

Why does an environment's label have to appear after the caption?

\documentclass{article} \usepackage{algorithm} \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label ...
29
votes
2answers
30k views

Change caption name of figures

How can I modify the caption name of a figure? For example I have \caption{This is a figure.} and by default the caption appears as Figure 1: This is a figure. However I want Fig.1 - This ...
29
votes
4answers
14k views

Two figures side by side [duplicate]

How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions. A figure is supposed to spread over the entire text width, but I have two ...
27
votes
2answers
29k views

Table and figure side-by-side with independent captions

Looking to put a table and a figure side by side so that the table and figure have their own captions. A crude sketch ------------ ----------------- TABLE | a | b | ...
25
votes
4answers
101k views

Tabular: title above and caption below?

I have a table that I would like to put the Title above and a caption below. Intuitively (though I know how troublesome intuition can be in something like LaTeX), I should be able to do as below: ...
24
votes
6answers
24k views

Caption on the side of a figure

Can anyone tell me how to get my caption on side of my figure, and at the same time aligned with the top of my figure?
23
votes
2answers
653 views

Add a rule underneath “Figure 1”

I want to add a line beneath the figure caption such as Figure 1 Figure caption text here.... I managed to include a newline, change the color and look of the caption via caption package: ...
23
votes
1answer
13k views

How can I modify vertical space between figure and caption?

\documentclass{article} \usepackage[draft]{graphicx} \begin{document} \begin{figure} \centering \setlength\fboxsep{124pt} \setlength\fboxrule{1pt} \fbox{\includegraphics{dummy}} \caption{Dummy ...
23
votes
1answer
8k views

Captions for figures in \listoffigures

When I use \listoftables and \listoffigures I get in the list long captions that appear next to the tables/figures. I would like to use short captions for this list which summarize these captions. Is ...
23
votes
2answers
3k views

Label and caption without float

I’d like to have an environment that works much like a float, except that it doesn’t float. That is, in fact, I’d like to be able to define an environment that has a label and a caption. I ...
21
votes
2answers
18k views

How to add caption for a TikZ picture?

I'm drawing a automaton figure, and I want to name it says 'M1' below the figure? A minimal example would be greatly appreciated. Thank you. \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on ...
20
votes
1answer
2k views

Using TikZ inside a figure caption

I have a PNG plot with a couple of black patches in it, and I'd like to refer to it in the \caption of of the figure. According to the TikZ manual, I'd have to \tikz \fill[black] (1ex,1ex) circle ...
19
votes
2answers
4k views

Remove colon in the caption of a figure if the caption is empty

One of my figures should not have a caption, only the normal numbering. To get this, I use this code: \begin{wrapfigure}{l}{4cm} \begin{center} \includegraphics[width=3cm]{graphic.pdf} ...
19
votes
2answers
2k views

Margin Figures/Captions

I have two figure/caption related questions. Firstly, in many textbooks, it is customary to put thin figures (along with their captions) entirely in the outer margin of the page. What is the most ...
19
votes
1answer
861 views

Caption parbox 6.0 pt too wide

For my listings, I use this caption setup: \usepackage{caption} \DeclareCaptionFont{white}{\color{white}} \DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}} ...
17
votes
3answers
707 views

Is there any difference between nesting \label in \caption and putting \label outside \caption?

Is there any difference in behavior between the following coding styles? Coding style A: \caption does not enclose \label. \begin{figure} \includegraphics{cat.eps} \caption{This is a cat.} ...
17
votes
1answer
21k views

Listings caption [duplicate]

I'm using the listings package with this \begin command: \begin{lstlisting}[caption=blabla, label=amb] This yields a nice code listing with a caption like "Listing 1.1 blabla". Is there a way to ...
17
votes
1answer
12k views

Figure: how to have “Figure 1.5” in bold

First of all, sorry if it's a nooby question. I'm fairly new to latex, and only know the basics right now. But I'm learning every day! So... I'd like to have my figure captions with the word Figure ...
16
votes
2answers
4k views

Beamer Presentation: Figure has no number?

I am giving a presentation and therefore I am using the beamer class. I have included some figures and it works, but there is no number after "Figure". My code: \documentclass{beamer} ...
15
votes
2answers
951 views

Placing TikZ drawings in a minipage side by side

I've some problems with aligning some drawings I made with TikZ: I want these two TikZ pictured below to be displayed side by side with the two captions being on the same horizontal level. ...
15
votes
3answers
15k views

How to remove figure caption prefix “figure” in beamer

I am trying to remove the caption prefix, "Figure", for my figures in beamer. I tried doing this but it made no difference. Heres a minimum working example: As you can see, I have included the ...
15
votes
2answers
20k views

How to force table caption on top?

I have a table which works ok...as per example below. But in the thesis, the right column is centered and caption forced to below table. Is there a way I can make it look like? ...
15
votes
3answers
246 views

┓- shaped figure and caption

I have a (float) figure that has a ┓-shape, that is there is a huge blank square at the bottom left. I'd like to put in this blank the caption of the figure. Is there a way? My class loads ...
14
votes
3answers
6k views

How to include verbatim in a figure caption?

I would like to include verbatim in a caption of a figure. I only want part of it to be verbatim, not the entire caption. The simple approach does not work because verbatim is not allowed in arguments ...
14
votes
2answers
5k views

Caption of figure in marginpar and caption of wrapfigure in margin

I'm writing my master thesis and have run into trouble with the layout of captions in relation to the margins. I have two main questions: How can I make the caption text of an figure placed in a ...
14
votes
1answer
2k views

Globally customizing the style of figure captions [duplicate]

Is it possible to globally alter the way figure captions are rendered? For example, I might want to wrap all captions in \textit to better distinguish captions from regular text.
14
votes
1answer
11k views

Change caption font size

I want to change the font size of a single rotated table caption (definitely not all the captions in all my tables/figures) Right now I can wrap the text inside the \caption around a \scriptsize{} ...
13
votes
4answers
334 views

How to prevent last period in captions from appearing in the list of figures?

Is there any simple way of removing the last character of an argument to a command (or environment)? I'm looking for a simple way to remove the punctuation mark from a caption when it appears in the ...
13
votes
2answers
458 views

How to draw 3 figures and have them side by side while they're connected

I would like to have 3 figures side by side, as in one of my previous posts. However, this time isn't the same. I would like to link my figures as below: My problem is not only how to put my ...
13
votes
2answers
13k views

What is the correct way to caption a `tikzpicture`?

I have some trees drawn with tikz and I'd like to have some text associated with them. I can use \caption within figure, but not tikzpicture. UPDATE: Thanks for your advice. figure seems to put my ...
13
votes
1answer
408 views

Spacing, subfigures and right captions (Creating a bar menu)

I am trying to create a bar menu for a student place I am part of. Now since we are studying CS, mathematics and or physics of course he have to use latex to create our barmenus or drinking lists. An ...
13
votes
1answer
2k views

Adding word 'Table' before each entry in list of tables

I need to prefix each entry in list of tables and figures with appropriate text - table or figure for each. Also I need to remove chapter numbers from list, because tables are numbered consequently ...
12
votes
1answer
6k views

Table captions are always placed below

I have a problem with table captions in LaTeX. They appear always below the tables instead of above as required by my editor. I've read lots of documentation and everybody says that if you place the ...
12
votes
4answers
8k views

Rotate picture with caption

How can I rotate both a picture and its title in TeX? Parameter in \includegraphics allows to rotate only a picture.
12
votes
1answer
918 views

putting a tikzpicture inside a \caption{}

I'm attempting to put a small tikzpicture inside a \caption{} belonging to a figure environment. The reason for doing this is fairly simple - to create an in-caption legend for a PGFplot, with ...
12
votes
1answer
1k views

How can I inject the proper amount of vertical space between captions and figures?

In my source document, I have an image and a code listing, separated by some text. When I generate PDF using pdflatex, the image is just above the listing, and it looks like the caption for the image ...
12
votes
3answers
11k views

How to limit the figure caption width?

Figure captions seem to wrap at the page width. How could I make them wrap at the figure width instead? Currently, they can easily be mistaken for normal text. \begin{figure}[!htb] \begin{center ...
12
votes
1answer
3k views

Horizontal line below figure caption

I would like to draw a horizontal line/rule beneath my multi-line caption to separate the caption more clearly from the rest of the text. A quick example: \begin{figure}[tb] \begin{center} ...
12
votes
1answer
756 views

“etc.” abbreviation macro gives error when used in caption

I've been using the abbreviation macros for i.e., e.g., and etc. that are provided in this post. However, I just discovered that the etc. macro, and a similar one I made for et al. both cause errors ...
12
votes
1answer
3k views

Change format of reference to a subfigure

In my current document, I'm working with many subfigures. Normally, I like to refer to them using a style like Figure 1 b) where the space should be a halfspace, hence \, in the code. That's nice not ...
12
votes
2answers
861 views

Gray box around figure with a separate gray box around caption

My university requires that all figures in a thesis follow this pattern: I'm very new to LaTeX, so far my best attempt has been this: \begin{SCfigure} \colorbox{darkgray}{ ...
12
votes
4answers
15k views

How to reference subfigure in caption

I used to have code like this: \caption{In \subref{fig:foo:a} you can see...}. Now I switched to using memoirs subtop/subbottom command instead of \subfigure. How can I refer to that subfigure? As a ...
12
votes
1answer
389 views

Are there any subfloat package that works with tufte-latex?

I'm trying a lot of subfloat-like packages with tufte-latex and all of them seem to interact badly with tufte-latex in the matter of labels, refs and captions. To captions I could find solutions ...
11
votes
3answers
621 views

Label in caption

For certain styles it appears that the \label statement must be included in \caption to preserve good referencing. Why is that?
11
votes
1answer
633 views

Where to put the \label on a figure environment? [duplicate]

Possible Duplicate: Why does an environment’s label have to appear after the caption? I noticed that when I put the \label command before the \caption command in a figure environment, I get ...