{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

135
votes
2answers
228k 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] ...
72
votes
10answers
54k 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 ...
69
votes
3answers
24k 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 ...
56
votes
4answers
21k 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 ...
54
votes
3answers
44k views

Change the font of figure captions

I would like to italicize my figure captions and make them smaller. How can I do that?
36
votes
2answers
36k 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 ...
35
votes
2answers
3k 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 ...
30
votes
2answers
34k 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 | ...
30
votes
4answers
123k 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: ...
30
votes
4answers
15k 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
1answer
10k 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 ...
26
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 ...
24
votes
6answers
29k 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?
24
votes
2answers
23k 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 ...
24
votes
1answer
15k 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
2answers
805 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: ...
20
votes
3answers
22k 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 ...
20
votes
2answers
25k 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? ...
20
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} ...
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
7k 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} ...
19
votes
1answer
15k 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 ...
19
votes
2answers
3k 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
941 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}}} ...
18
votes
4answers
10k 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.
18
votes
1answer
25k 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
3answers
804 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.} ...
16
votes
2answers
2k 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
2answers
15k 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 ...
15
votes
3answers
13k 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 ...
15
votes
3answers
276 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
7k 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
3k 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
3k views

Avoiding “\Url Error ->\url used in a moving argument.” in a custom environment

I have a document I'm trying to render using two classes -- my university's dissertation .cls, and tufte-latex (my uni's styleguide is ugly, and I want to make a pretty-print version for my own ...
14
votes
1answer
20k views

How to center a specific caption?

I'm having a problem with centering my figure captions. Particuarly, I know that we can use \usepackage[justification=centering]{caption} to center captions, however, I'm interested in just centering ...
14
votes
1answer
12k 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
356 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
574 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
1answer
32k views

Font size of Figure Caption Header

My question is about changing the font size. I have to insert two figures side by side. Coming to inserting the captions for the figures individually: Figure 3: blah blah.....................Figure ...
13
votes
4answers
10k views

How to add line break to caption without using caption package

I wish to add a line break to a caption, but I would wish to avoid adding of caption package. Is it possible? \documentclass{article} \usepackage[format=plain, ...
13
votes
2answers
5k views

Floating an algorithm?

I'm typesetting an algorithm using the algorithmx package as follows: \begin{algorithm} \caption{\textsc{Whatever}} \begin{algorithmic}[1] ... \end{algorithm} However, I would like it to ...
13
votes
1answer
456 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
4k 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 ...
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 ...
13
votes
3answers
11k views

LaTeX (beamer) — Is there a way to suppress the caption label of “Figure X:” or “Table X:”?

I am making a beamer presentation of someone else's research paper (so I don't have the original tex code). I am using pdfs of tables in the presentation but wanted to cut out all of the original ...
12
votes
1answer
7k 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
2answers
3k views

Subcaption with Beamer

I am trying to use subcaption with beamer, but I get a series of error messages concerning subcaption.sty when I attempt to do so. This doesn't happen in the article document class. Here is a MWE ...
12
votes
2answers
3k views

How do you put multiple paragraphs in a caption?

I have a really long caption for a figure in a LaTeX document. I would like to break the caption into a few paragraphs. How do I do that? As per the request below, I removed everything I could ...
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 ...