{subcaption} is a package for typesetting captions of {subfloats}.

learn more… | top users | synonyms

65
votes
3answers
22k 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 ...
13
votes
1answer
11k views

Subcaption package: compatibility issue

There is a compatibility problem between the CIFA document class and the subcaption package. When I compile the following example (with PDFLaTex): \documentclass{cifa} ...
12
votes
2answers
158 views

Why does \label create an undesired white space after \phantomsubcaption?

Usually \label does not create any white spaces. However, It creates an white space when \label is used after \phantomsubcaption from subcaption package. Why? How can I get rid of this white space? ...
12
votes
1answer
364 views

Are subcaption and tabularx incompatible?

I know that tex.sx isn't the forum for bug-reporting, but I have a bit of a problem and I'm looking for a technical workaround. The following MWE produces odd labels: \documentclass{article} ...
12
votes
1answer
404 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
2answers
1k 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 ...
10
votes
1answer
499 views

nag l2tabu caption/label checking versus \subcaptionbox

The nag package used with the l2tabu option complains when \label is used in a float without following a \caption. Unfortunately, it does not understand that the first argument of \subcaptionbox from ...
10
votes
1answer
553 views

How to change the display of subfigures in List of Figures?

I'm using the subcaption package and I would like to change the display in the List of Figures of the subfigures. Right now, it displays as : 2.1 Caption 1 . . . . . . . . . . . . . . . . . . . . . ...
9
votes
2answers
5k views

Subfig label positioning

Can anyone tell me how to change the horizontal position of subfigure labels? I have: \captionsetup[subfigure]{labelformat=simple,position=top} Is there something like: {position=topleft} to ...
9
votes
1answer
3k views

Setup for sub-captions for two sub-figures one below the other

I am using the caption and subcaption packages to create sub-figures in a document. I have two cases of sub-figures: Two sub-figures side-by-side. For this, the captioning is excellent. Two ...
8
votes
2answers
168 views

Append \centering to \begin{subfigure} (from subcaption package)

How can I append \centering to \begin{subfigure} (from subcaption package)? I tried using the etoolbox , but for some reason it won't work for the subfigure enviroment (only working for the figure ...
8
votes
1answer
748 views

Is there an incompatibility between the packages breqn and subcaption

When I try to typeset with both the packages subcaption and breqn, I get the following error: ! Package caption Error: The `subcaption' package does not work correctly(caption) in compatibility ...
8
votes
1answer
321 views

KOMA-Script and subcaption: wrong counting

I'm getting a to-me strange behavior when using scrartcl and subcaption. In particular, numbering is doubled for each table with the default option captions=tableheading. Here's an image (code at ...
8
votes
2answers
2k views

Align by the top borders of figures when using subcaption

I'm using the subcaptionpackage to have figures side-by-side. The problem is that the package aligns the figures to their subcaptions (should I be taking a hint for the package name?) rather than the ...
8
votes
1answer
115 views

subcaption: remove page number from lof

I use the caption and subcaption package as shown in the example below: \documentclass{article} \usepackage{caption} \usepackage{subcaption} \captionsetup[subfigure]{list=true} \begin{document} ...
8
votes
2answers
7k views

How to place subfigure caption on the side?

Is there some way to tell subfig package to place subfigure captions to the left or to the right of subfigures? There is sidecap package which does it for the main captions, but it does not affect ...
8
votes
1answer
83 views

Two identical diagrams inserted with subcaption box come out at different scales

I have two diagrams that are 100% identical except for a red line in the other one. However, when they are included in a figure as two subfigures with subcapionbox, the one with the red line is ...
7
votes
1answer
7k views

Referencing subfigures in main caption (with \subfloat and \subref)

I've used subfloat to include subfigures, with their relevant labels but with empty captions. what I'm going to do is to reference these figures with \subref in the main caption of the figure. But ...
7
votes
1answer
180 views

subcaption in LOF with hyperref

MWE: \documentclass{article} \usepackage{subcaption} \usepackage{hyperref} \begin{document} \listoffigures \begin{figure} \begin{subfigure}[b]{.5\linewidth} \centering\large A \caption{A ...
7
votes
3answers
1k views

Subcaption compatibility with ACM document class

I'm currently working on a paper for an ACM conference and they require me to use the sigplanconf.cls I want to use subcaption, but if I add \usepackage{caption} \usepackage{subcaption} then I get ...
7
votes
2answers
498 views

table rescaling and subcaption package

I am placing tables side-by-side using the subcaption package in the following way: \documentclass{article} \usepackage{siunitx} \usepackage{booktabs} \usepackage{subcaption} \usepackage{tabularx} ...
7
votes
1answer
206 views

Centering a subcaption

I have three figures that I want to place next to each other. That is fine. In addition, however, each subfigure has a caption on its own and the crucial thing with these is that I have to have two ...
7
votes
2answers
9k views

Missing number, treated as zero

A follow-up question to this one Aligning subcaptions with tikz pictures vertically This is the code I am using, worked to a pretty minimal scenario: \documentclass{article} \usepackage{float, ...
7
votes
1answer
49 views

Label handling in a macro

I want to create an environment to easily list a bunch of subfigures with their explanations. But the explanations should appear only in the caption of the complete figure, instead of the subfigure's ...
6
votes
2answers
928 views

How can I have images that are side-by-side and have numbers attached to each one?

For example: *Image 1* *Image 2* *Image 3* (i) (ii) (iii) Figure n. Multiple images. (i) image at time n. (ii) Image at time n+1. (iii) Image at time n+2
6
votes
2answers
2k views

memoir class with subcaption and hyperref packages

This is similar to this question about using subfigures in memoir class and this one about using subfigure memoir and hyperref together Is it possible to use memoir class with sucaption package? I ...
6
votes
3answers
226 views

Vertical alignment of subfigures of different horizontal length

I have four different tikzpictures merged in one single figure by means of the subcaption package and the \subfigure environment. However, the figures have different horizontal lengths, so I don't get ...
6
votes
1answer
86 views

how to suppress page number for subfigures in LOF?

I am using tocloft and subcaption package, and I would like to suppreess page numbers and dot line for subfigures in LOF. I know, if one uses tocloft and subfigure package, this can be done with the ...
6
votes
1answer
3k views

Using subcaption with graphicx: How to solve the “Missing number treated as zero” problem?

I'm trying to use the subcaption package to build composite figures. When I try to include an image using \includegraphics{}. I get the error beneath. I know this is very similar to Subfloat with ...
6
votes
2answers
146 views

How to customize cleveref package macro to be consistent when multiple figure references are used in this case?

The cleveref package does a very nice job of sorting the labels of the many references for you (whatever they are) in their natural order. However, I was stumbled by a special case when I wanted to ...
6
votes
2answers
553 views

compare two diagrams side by side

I'm trying to compare two diagrams in pdf format side by side. I have this post - Two figures side by side to get some hint. This is the code that I'm coming up with. \begin{figure} ...
6
votes
2answers
359 views

How to make “sub-level” numbering for listings, similar to subcaption?

I think what I'm trying to do may be complicated, so if not all of it is possible then that's OK. I'm using the listings package and I've done something similar to Custom numbering of listings ...
6
votes
2answers
743 views

Vertical Spacing using \subcaption package

I have a simple problem. I'm trying to add a little bit of vertical spacing between the top two and bottom two subfigures. Here's my code: \documentclass{article} \usepackage[demo]{graphicx} ...
6
votes
3answers
330 views

How to place text and image above the exact subfigure?

I want to draw something like this: I am able to draw like this: This is the code for the same: \documentclass{article} \usepackage{tikz,subfig} \begin{document} \begin{figure} \centering ...
6
votes
1answer
1k views

Captioning nested subfigures with subcaption

The following creates a figure with three images arranged appropriately. If I remove the two \caption{} lines, it numbers the main subfigures as I'd like, and keeping the two \caption{} lines puts ...
6
votes
1answer
736 views

Aligning subcaptions with tikz pictures vertically

A simple follow-up question to this one How to place and scale TikZ pictures in subfigure? I shamelessly copied the same code that was presented in the answer there because it fits my needs exactly as ...
5
votes
2answers
70 views

Problem with subcaptions in subtables

I am trying to implement a table with several subtables, but working with subcaption does not work neither when I try tabularx. This subtables have different number of columns. with the following code ...
5
votes
2answers
212 views

How to calculate the width for placing 2 big images side by side?

I'm trying to put 2 images in a row with this code, and runs well, but... don't adapt the size of the last 2 images in a row. \documentclass[12pt,a4paper]{article} \usepackage{graphicx} ...
5
votes
2answers
397 views

insert text RIGHT under image ABOVE caption

How do I place text RIGHT below an image (above the caption) within subfig? Here Is my code: \documentclass{article} \usepackage{hyperref} \usepackage{graphicx} \usepackage{subfig} ...
5
votes
1answer
161 views

How to make distance between captions of close pictures?

The captions between the pictures are too close to each other. How can I make some space between them, but do not move pictures itself? \documentclass{article} \usepackage{graphicx,subfigure} ...
5
votes
2answers
2k views

Table and Figure side-by-side with Table caption above, Figure caption below

A continuation of this question. I'm fighting a page-limit in a single-column layout and I need to put a Figure and a Table side-by-side and provide them with independent captions. However, the style ...
5
votes
1answer
4k views

Subfloat with subcaption package: Missing number, treated as zero

I want to make a figure consisting of two subfigures. Having read the Wikipedia subentry on subfloats, I tried to follow it exactly, so I did not use the subfig or subfigure package, only the caption ...
5
votes
1answer
1k views

subfigure numbering in subfigure environment (subcaption package)

My new friend is the subfigure environment of the subcaption package. Although reading the manual by Axel Sommerfeldt i did not managed to change the subfigure numbering from lower case letters to ...
5
votes
1answer
424 views

tufte-latex and subfloat positioning

I'd like to have two rows of top-aligned images, with top-aligned captions below each. This answer provides a technique using the floatrow package, but something in that package (or one of its ...
5
votes
2answers
520 views

Use of subcaption in enumerate environment

This is a simple question. Say you were to place two (or more) related figures in an enumerate environment. Outside of an enumerate environment, which itself is a floating environment, you would ...
5
votes
1answer
710 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
2answers
535 views

Top-aligned subfigure with bottom-aligned caption

This is a follow-up to an earlier question regarding left-aligning subfigure captions. Having achieved the left-alignment goal, I would now like the caption of the subfigure to be bottom-aligned, ...
5
votes
2answers
2k views

Maximise vertical space between subfigures with \subcaption

I have 2 subfigures vertically arranged using the subcaption package. I can set the vertical space between the 2 to something specific (using \bigskip or \vspace), but I would like to put as much ...
5
votes
1answer
2k views

Vertical alignment of subfigures with different subcaptions length

I would like to vertically align 3 subfigures (same size), but I don't manage to do so if the subcaptions have different lengths, like here: This is the code that generated the image: ...
5
votes
2answers
5k 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 ...