tabularray icon indicating copy to clipboard operation
tabularray copied to clipboard

Using `tabularray` for typesetting figures

Open DaftDogeee opened this issue 3 years ago • 3 comments

Hi, Jianrui,

Many thanks for your solid works on the package. I am using the package to typeset figures, but there are some issues, including the wrong numbers and the repeated items in the LOF. The MWE is listed as follows.

\documentclass{article}

\usepackage{graphicx}
\usepackage[caption=false,font=footnotesize,subrefformat=parens]{subfig}

\usepackage{tocbibind}
\usepackage[subfigure, titles]{tocloft}
\setcounter{lofdepth}{2}

\usepackage{tabularray}

\begin{document}

\listoffigures

\begin{figure}[!h]
    \begin{tblr}{
        % vlines,
        colspec = {X[1,l,m]X[1,c,m]},
        columns = {leftsep=0pt,rightsep=0pt},
        cell{1}{1} = {r=2}{c,m},
    }
    \subfloat[Subfigure title.]{\includegraphics[width=0.5\textwidth]{example-image-a}} & \subfloat[Subfigure title.]{\includegraphics[width=0.5\textwidth]{example-image-a}} \\
    Test & \subfloat[Subfigure title.]{\includegraphics[width=0.5\textwidth]{example-image-a}}
    \end{tblr}
	\caption{Figure title.}
\end{figure}

\end{document}

截屏2022-04-06 下午10 08 15 截屏2022-04-06 下午10 08 09

DaftDogeee avatar Apr 07 '22 02:04 DaftDogeee

For the first problem, you need to load counter library with \UseTblrLibrary{counter}.

lvjr avatar Apr 07 '22 02:04 lvjr

The second problem is a little complicated and need some time to be fixed.

lvjr avatar Apr 07 '22 02:04 lvjr

Many thanks for your timely reply. I have solved the first issue with simply loading \UseTblrLibrary{counter}.

DaftDogeee avatar Apr 07 '22 02:04 DaftDogeee