{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

5
votes
1answer
1k views

Different width for caption and floatfoot with floatrow

I am using the floatrow package. I would like to define a separate width for both the caption above and the \floatfoot below the floats. I want the caption to span the entire width of the page, but ...
5
votes
1answer
769 views

How to \ref to subcaption numbers (a, b) when using memoirs subcaptions?

How can I get references to subcaption numbers when using memoir? In this example: \documentclass{memoir} \newsubfloat{figure} \begin{document} \chapter{Lorem} \section{ipsum} \begin{figure}[b] ...
5
votes
1answer
863 views

Removing the borders from algorithm listings

I am relatively new to LaTeX. If I use standard algorithm and algorithmic environment for my algorithm listings I'm getting the borders displayed around the table with the pseudocode. How to remove ...
5
votes
1answer
978 views

\listoffigures chokes on inline math delimiters in captions. What is going on?

I'm working on my thesis, and I've realized that, any time I try to use \( \)-type inline delimiters in captions, that pdflatex breaks. While I can weasel out of actually \needing\ math in my ...
4
votes
1answer
131 views

How can I mimick the listing caption style for my custom “Listing (cont.)” caption?

I have the following LaTeX code which works fine: \documentclass[12pt,a4paper]{article} \usepackage[a5paper]{geometry}% just for the example \usepackage[utf8x]{inputenc} \usepackage{listings} ...
4
votes
1answer
279 views

Command to insert filename in caption of a listing

I would like to have a command to insert listings that contain the filename in the caption. This works well as long as there is no "_" etc. in the filename. I also tried the suggestion from a ...
4
votes
2answers
2k views

Hypcap not working with custom figure environment

I'm trying to use caption with hypcap=true so that cross-reference hyperlinks will go to the figure instead of the figure caption. However, I'm using a multicol environment with a custom figure ...
4
votes
1answer
412 views

Want figure height to ignore side caption height

I use beside captions placed in a large margin area. Sometimes, the caption text is taller than the figure and this causes too much vertical space around the figure. I'd like the effective height of ...
3
votes
2answers
149 views

Disable or heavily penalise pagebreaking at a specified place

Is there a way in LaTeX to disable (or heavily penalise) pagebreaking at a specified place? Here's an example: \documentclass[]{minimal} \usepackage[a6paper]{geometry} % demonstration use only ...
3
votes
1answer
284 views

In Lyx, align text inside a float caption

I'm trying to align a legend inside a table caption, so that the colons are vertically aligned. I can do it with the align ambient outside of the caption, but if I use the same code inside the caption ...
3
votes
0answers
490 views

Incompatibility of caption and cleveref package [closed]

The following code produced a TeX capacity exceeded error \documentclass{scrbook} \usepackage{caption} \usepackage{cleveref} \begin{document} \begin{figure} Text \label{fig:figures:1} ...
2
votes
1answer
61 views

Prevent a part of the caption from appearing in the list of figures

I am using the 'article' class, 'figure' environment. My captions are divided in two parts: the information about the figure the credits of the figure (for which I use \textfff{}) In my list of ...
2
votes
1answer
83 views

Optional caption in listings (for listoflistings)

I have some cites in my captions. But I do not want to appear them in the table of figures or listings. With figures I managed to display an different caption like this: \begin{figure} \centering ...
2
votes
2answers
460 views

Caption and sections, subsections and subsubsections

I'm writing my thesis in Latex and this is the first time ever for me to use it. I've figured out a lot of things except this one - I need custom captions for pictures that are connected with ...
2
votes
1answer
316 views

label in subcaption and customize cell size of an array

Using the following code \documentclass[11pt]{article} \usepackage{caption} \usepackage{subcaption} \DeclareCaptionSubType*[arabic]{table} \captionsetup[subtable]{labelformat=simple,labelsep=space} ...
1
vote
1answer
11k views

How to remove space after image caption? [duplicate]

I am writing one article in which i need to write one image and its caption. I found space after caption seems to be more than normal. \begin{figure}[!ht] \centering ...
1
vote
1answer
586 views

Left/Center/Right references to subfigures

I have a figure with three subfigures shown in the code sample below. How can I change the reference to a subfigure so that I have Figure 1 (left), Figure 1 (center), and Figure 1 (right) instead of ...
1
vote
2answers
1k views

How to change the position of the caption in a “narrow” and “minipage” environment?

I have some huge figures to include in Latex. Therefore I use the "minipage" and "narrow" environment to place it right at the desired position and to move it to the left until it looks centered. ...
1
vote
1answer
3k views

Listing of a file with underscores in its name/path

I am writing a report with LaTeX and I need to list some source code. One of the files has some underscores in its path/name. When compiling the following line : ...
1
vote
1answer
3k views

Caption labelfont in uppercase, what am I doing wrong?

I'm trying to get the subcaptions and captions in sanserif font and Uppercased. According the manual of the caption package this should be possible in the following way.However, this doesnt seem to ...
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: ...
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 ...
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 ...
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 ...
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 ...
9
votes
2answers
8k views

Multi-page Figure with subcaption package

I have a figure with subfigures defined using the subcaption package (*not the deprecated subfig or subfigure). I need the parent figure to span two pages with two subfigs on each page. I have ...
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 ...
11
votes
1answer
10k views

The space between the table and its caption is very small

I have a table written like this: \begin{table} \centering \begin{tabular}{|l||c|c|} \hline&Column 1&Column 2\\ \hline\hline cell1 & cell2 & cell3 \\ ...
10
votes
1answer
10k views

Table caption without the word “table”

Whenever I put \begin{table} \begin{tabular} ... \end{tabular} \caption{My great table} \end{table} It would end up with the name "Table 1: My great table". I don't want the prefix "Table 1:". Is ...
8
votes
2answers
7k views

Table numbering mismatch in caption and in text

I have created 2 tables in my LaTeX document \begin{table}[hb] \centering \begin{tabular}{|c|c|r|} \hline ... not important... \end{tabular} \label{tab:2} \caption{Določanje prioritet mojstrov ...
17
votes
3answers
807 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.} ...
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 ...
12
votes
2answers
918 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
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 ...
10
votes
1answer
826 views

change caption in tufte class full-page figure

I've tried to change the caption in a full-width float with tufte-book, but to no avail. I want the caption in this figure to be like more common LaTeX classes. Here is a MWE and the result: ...
9
votes
2answers
705 views

Why does manually loading hyperref change the font size for captions in Tufte documents?

I'm using Tufte document classes and need to manually load hyperref rather than have it loaded by the Tufte class. So I'm using the nohyper option with the document class, and later use ...
8
votes
2answers
450 views

Automatically bold first sentence of a floats caption

How to bold automatically the first sentence of the float caption and second sentence is normal? \begin{figure}[t] \centering \caption{First sentence. Second sentence.} \end{figure} Output should ...
7
votes
1answer
982 views

Captions for tables included via pdfpages

I have a large number of multipage longtables as independent pdfs. I am including these pdfs in my main document using the pdfpages package. My code for including the PDFs currently looks like this: ...
5
votes
2answers
4k views

\footnotetext on different page from \footnotemark

I was forced to use \footnotetext and \footnotemark on because I needed a footnote in a couple of captions. Of the three times this is done in the article: one works fine, the second appears on the ...
3
votes
2answers
499 views

How can I force an image and its caption to be on the same page?

I am using the caption package, now I have one problem: In one case an image is placed at the bottom of one page, while its caption is placed on the top of the following page. In this case I would ...
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 ...
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
8k views

Too wide figure caption

I included a figure using the figure environment with a rather long caption. The width of the caption is the same as the page width, which doesn't look so nice. Is there any way to reduce the width of ...
11
votes
3answers
3k 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 ...
9
votes
1answer
4k views

Put text to the right of figures

How can I display text to the right of figure, vertically centered? "Caption" is only displaying text below it, as it seems to me.
8
votes
3answers
2k views

Longtable caption numbering

I am trying to prevent a table from showing up in the list of tables. I used long table to create the table. This is the first table in my document. I know \caption*{} command should do the trick but ...
7
votes
1answer
15k views

Resize table and caption

I usually apply a \scalebox to resize things, but I always stumble upon the fact that I cannot simply include a \caption{...} in the \scalebox. As an alternative to \scalebox, I found I may use ...
7
votes
4answers
4k views

Table caption align top-right

How I can align caption for table like this? Current code: \begin{table}[h] \caption{} \centering \begin{tabular}{|l|r|r|l|} \hline № & X & Y & Время ...
7
votes
3answers
2k views

How do I make figure captions span multiple pages?

How do I make figure captions span multiple pages? I have a very long caption for a figure and would like it to carry on to the next page. EDIT: I would like this to work in both one sided and two ...
7
votes
2answers
1k views

minted's listing environment with hyperref and caption package together

I use the minted package for code highlight. I use its listing environment. I also use the hyperref package to provide links all through my document: figures, tables, listings, etc. If I import the ...