I've read that the subfigure
package has been deprecated in favor of the subcaption
package. However, the subcaption
package has the unfortunate requirement that you specify the width of each subfigure in advance. But, for the common case of creating a row of same-height subfigures, you don't know their widths in advance, you just know that you want all them to be 5cm tall (for example).
So, what would be a recommended (and not deprecated) package for making strips of subfigures so that they're automatically scaled to a given height?
Note: The easiest syntax, the better (ie: I prefer to avoid manually defined minipages nor custom boxes, and use a package with easy syntax instead, just like subcaption
, subfigure
, etc…)
Best Answer
There is no requirement to specify the width of the box when you supply the content inside a
\subcaptionbox
:The width of the resulting box is made to fit the contents naturally. You can specify the width if you need to, since
\subcaptionbox
has the following extended usage/format:Note the optional macro for specifying the
<width>
of the box.