{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.
37
votes
3answers
9k 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 ...
35
votes
3answers
7k 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 ...
31
votes
7answers
19k 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 ...
25
votes
2answers
754 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 ...
24
votes
3answers
14k views
Change the font of figure captions
I would like to italicize my figure captions and make them smaller. How can I do that?
23
votes
2answers
281 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:
...
18
votes
2answers
1k 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 ...
18
votes
1answer
535 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
2answers
13k 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 | ...
17
votes
2answers
12k 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 ...
17
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 ...
15
votes
3answers
404 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.}
...
15
votes
1answer
643 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 ...
14
votes
2answers
2k 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}
...
14
votes
2answers
6k views
Two figures side by side
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 ...
13
votes
5answers
9k 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?
13
votes
2answers
3k 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 ...
13
votes
2answers
6k 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 ...
13
votes
1answer
217 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
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 ...
12
votes
4answers
256 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 ...
12
votes
1answer
697 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
3answers
33k 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:
...
12
votes
1answer
1k 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
2answers
660 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}{
...
11
votes
3answers
4k 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 ...
11
votes
2answers
6k 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 ...
11
votes
1answer
8k views
Listings caption
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 ...
11
votes
2answers
1k views
How to build and combine sophisticated layouts in figures
How can I get a layout like the one below in my document?
With this question, I am looking for:
An ...
11
votes
2answers
363 views
How can I put the empty subfloat subcaptions to the right?
I'm putting two figures above each other with \subfloat from the subfig package. Their captions are empty as I just want to describe the figures with the main caption, but I still want the (a) and (b) ...
11
votes
2answers
204 views
Center caption in listing
I want to put the caption of my listing in the center but I can't do that. Do you have any idea how I could achieve this? The code:
\documentclass{report}
\usepackage{color}
\usepackage{xcolor}
...
11
votes
2answers
428 views
Conditional figure environment (sideways, bottom captions)
For my phd dissertation I would like to have a new environment for figures that gives me the possibility to either place the caption sideways if there is enough space (say the figure width is < 0.6 ...
10
votes
3answers
513 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?
10
votes
3answers
187 views
TikZ: How to center captions below figures in matrix
I have three figures that I want to align in a matrix. Each figure is drawn in a different way and needs a caption that is centered below the corresponding figure.
Here is what I currently have:
...
10
votes
3answers
2k views
List of Figures - how to add caption label
I'm using the caption package.
In the List-Of-Figures I get only the numbers, but I also want to have the prefix.
It currently looks like that:
List of Figures
1 Caption of Figure 1........1
...
10
votes
2answers
4k 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
...
10
votes
1answer
665 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 ...
10
votes
1answer
3k views
How can I get rid of the LaTeX warning: Float too large for page?
In my document, I have figures that have a rather long caption. The code I use to include them looks like this:
\begin{figure}
\begin{center}
\includegraphics[width=\textwidth]{../fig.pdf}
...
10
votes
1answer
455 views
Cite in the caption of a graphic but not in \listoffigures?
Sometimes I'd like to cite the reference in the caption of a graphic. But I want to avoid that this citation is displayed in the \listoffigures. How can I achieve that?
Fore example with this code:
...
10
votes
1answer
1k views
List of figures: source below image caption?
I'm relatively new to LaTeX and currently working on a paper. In my list of figures, I'd like to have a structure like this:
Fig. 1: <Title of figure> . . . 1
...
10
votes
1answer
67 views
Using a caption label as a title
I have done some searching but not had much luck.
I would like to be able to see and use the label of my caption as a 'title' for the caption text.
An example:
\documentclass[11pt]{article}
...
10
votes
1answer
5k 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{} ...
10
votes
1answer
1k 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}
...
10
votes
1answer
193 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 ...
10
votes
1answer
2k 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 ...
10
votes
1answer
4k views
10
votes
3answers
2k views
Line up captions on side by side figures
I want to place two (or more) figures with side by side. The figures are independent, so need separate captions, with no overall caption for the two. I know how to do this with minipages within a ...
10
votes
1answer
703 views
What does “you have forgotten to use \caption” mean?
I'm stumped by an error I'm getting, when I try to render a Tufte-LaTeX document using hypcap and hyperref. For example, even a minimal document consisting of
\documentclass[nohyper]{tufte-handout}
...
9
votes
4answers
645 views
Caption and footnote width with ctable
I am using ctable and I have a table with footnotes. Since the table is narrow, the caption text is squeezed in the table width, which looks odd. I can use mincapwidth to specify a minimum width for ...
9
votes
1answer
3k 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 ...
