# subcaptionlite Package **LaTeX: Subfigures and subtables without the caption package** The subcaption package needs the caption package, which redefines `\@makecaption` of the class. Thus it cannot be used with a class that has its own design of captions. The subcaptionlite package provides the `subfigure` and `subtable` environments, `\subcaption`, `\subcaptionbox` and `\subref` with the same syntax as subcaption, without touching `\@makecaption` of the class: 1. Subfigures and subtables are numbered (a), (b), ... within each figure or table, and `\ref` gives e.g. `4.2(a)` (`\Cref` of cleveref: "Figure 4.2(a)", "Table 4.2(a)"); `\subref` gives only `(a)`. With hyperref, each subfigure and subtable has its own anchor. 2. The number of the float is right whether its `\caption` comes after the subcaptions (the first subcaption steps the counter in advance, as the subcaption package does) or before them. 3. `\captionsetup` is accepted and ignored, so that the settings for the caption package can be left in the document. * **Supported formats/engines:** pdfLaTeX, XeLaTeX, LuaLaTeX (with or without LuaTeX-ja), pLaTeX, upLaTeX (+ dvipdfmx) ## Files | File | Description | |---|---| | `subcaptionlite.sty` | The package | | `subcaptionlite.tex` / `.pdf` | Documentation | | `test-*.tex` | Test suite (see below) | ## Requirements * LaTeX2e 2020-10-01 or later, `etoolbox` * Tested with TeX Live 2026 (LaTeX2e 2026-06-01, hyperref 7.01s) ## Installation Copy `subcaptionlite.sty` to your local TeX tree: `$TEXMF/tex/latex/subcaptionlite/` ## Usage ```latex \usepackage{subcaptionlite} \begin{figure} \centering \begin{subfigure}{.45\linewidth} \centering\includegraphics[width=\linewidth]{a} \caption{The first}\label{fig:a} % \caption means \subcaption here \end{subfigure}\hfill \subcaptionbox{The second\label{fig:b}}[.45\linewidth]{% \includegraphics[width=.8\linewidth]{b}} \caption{Two subfigures}\label{fig:ab} \end{figure} Figure~\ref{fig:ab} has two parts, \subref{fig:a} and \subref{fig:b}. \begin{table} \centering \caption{Two subtables}\label{tab:ab} \begin{subtable}[t]{.45\linewidth} \centering \caption{The first}\label{tab:a} \begin{tabular}{ll} ... \end{tabular} \end{subtable}\hfill \subcaptionbox{The second\label{tab:b}}{\begin{tabular}{ll} ... \end{tabular}} \end{table} ``` * `\begin{subfigure}[]{}`, `\begin{subtable}[]{}`: a minipage (``: `b` by default, as in subcaption; give `t` to align subtables with their captions above), inside which `\caption` and `\caption*` mean `\subcaption` and `\subcaption*`. * `\subcaption{}`, `\subcaption*{}`: a numbered/unnumbered subcaption, e.g. in a minipage. It is numbered with the counter of the float it is in: `subfigure` in a figure, `subtable` in a table. * `\subcaptionbox{}[]{}`: `` centered in a minipage of `` (default: the natural width of ``; with ``, `\linewidth` in `` is ``), followed by `\subcaption{}`. The minipage keeps `` even if `` is wider. * `\subref{