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

learn more… | top users | synonyms

90
votes
3answers
30k 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 ...
20
votes
1answer
18k 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} ...
14
votes
1answer
6k 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 ...
14
votes
2answers
14k 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
14k 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 ...
13
votes
2answers
408 views

Vertically aligning minipages, subfigures, and subtables (not with baseline)

The goal My goal is to align side-by-side figures, tables, and text in minipages according to the top, middle and bottom of the largest such minipage. This makes it different (I believe) from the ...
12
votes
2answers
246 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
405 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
528 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 ...
10
votes
1answer
1k 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 . . . . . . . . . . . . . . . . . . . . . ...
10
votes
2answers
8k 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 ...
10
votes
1answer
613 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
2answers
4k 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, ...
9
votes
2answers
2k 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} ...
9
votes
2answers
12k 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, ...
9
votes
1answer
4k 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
3k views

I get an error when using subfigure with memoir

I made an article and insert several subfigures in that as follows: \begin{figure} \centering \begin{subfigure}[b]{0.3\textwidth} \includegraphics[width=\textwidth]{fig6_1} ...
8
votes
1answer
7k 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: ...
8
votes
2answers
360 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
1k views

Is there an incompatibility between the packages breqn and subcaption [closed]

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
3answers
2k 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 ...
8
votes
1answer
466 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
3k 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
75 views

xparse's \DeclareDocumentEnvironment gives error on already-defined environment

I'm trying to redefine an existing environment subfigure defined by the subcaption package. To do this, I'm using xparse's DeclareDocumentEnvironment since that's suppose to declare a new environment ...
8
votes
2answers
154 views

Problem with subcaption spacing

When using the subcaption package to place tables1 side-by-side, the spacing between a table and its subtable caption is too small if the table caption is placed above the tables and the subtable ...
8
votes
1answer
152 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
9k 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
148 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
2answers
1k 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
7
votes
1answer
319 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
1answer
1k 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
932 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
54 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
3k 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
1answer
167 views

How to get rid of that ugly acute (“anw tonos”) in the greek alphabetical numerals?

When using subcaptions in a figure, in a greek document (LaTeX or XeTeX), the labels are numbered with (α'), (β'), (γ') and so on, as shown below. Is there a way to remove the 's ? ...
6
votes
2answers
106 views

Placing of subfigures with different widths

MWE: \documentclass{scrbook} \usepackage[showframe]{geometry} \usepackage[draft]{graphicx} \usepackage{blindtext} \usepackage{subcaption} \begin{document} \begin{figure} ...
6
votes
3answers
406 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
130 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
4k 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 ...
6
votes
1answer
5k 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
247 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
838 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
429 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
1answer
64 views

Rearranging subfloats with subcaption

I have some code which gives the following result: The code was: \documentclass[demo]{book} \usepackage{graphicx} \usepackage[hypcap=true]{subcaption} \begin{document} \begin{figure}[tbp] ...
6
votes
3answers
190 views

Separation between caption and subcaption

Consider the following MWE \documentclass{article} \usepackage{caption} \usepackage{subcaption} \begin{document} \begin{figure} \begin{subfigure}[t]{.5\linewidth} \centering \rule{3cm}{3cm} ...
6
votes
1answer
3k views

Using listings and subfigure together

I am writing a document in which code listings and diagrams appear side-by-side frequently. I am using the listings package for the code and \includegraphics for the diagrams. I want to put them both ...
6
votes
3answers
536 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
2k 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
92 views

How do I do complex positioning of my subfigures?

I'm writing my bachelors thesis, and I have som trouble positioning my subfigures. I have three figures in different sizes, and I would like to have an output like this: I tried typing the ...
6
votes
1answer
891 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 ...