打个比赛是真折腾啊..可以再试试看看这个链接,给minipage
注册一个figure
同款环境。
\documentclass{article}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tabularray}
\usepackage[table]{xcolor} % 用于设置表格颜色
\usepackage{lipsum}
\captionsetup[subfigure]{labelformat = parens, labelsep = space, font = small}
\begin{document}
\lipsum[2]
\noindent\begin{minipage}{.6\textwidth}
\captionsetup{type=figure} % -- This line added
\centering
\subcaptionbox{the first label \label{labelaaa}}
{\includegraphics[width=.78\textwidth]{example-image-a}}
\subcaptionbox{the second label \label{labelbbb}}
{\includegraphics[width=.78\textwidth]{example-image-b}}
\caption{A whole-total caption}
\end{minipage}
\begin{minipage}{.35\textwidth}
\centering
\begin{tblr}{
hlines, vlines,
cells={c},
row{4,5,7,14}={bg=gray!30}, % 将第4,5,7,14行背景设置为灰色
colspec={Q[c,m]Q[c,m]},
rowsep=5pt, colsep=5pt % 设置行间距和列间距
}
Header 1 & Header 2 \\
Row 1, Col 1 & Row 1, Col 2 \\
Row 2, Col 1 & Row 2, Col 2 \\
Row 3, Col 1 & Row 3, Col 2 \\
Row 4, Col 1 & Row 4, Col 2 \\
Row 5, Col 1 & Row 5, Col 2 \\
Row 6, Col 1 & Row 6, Col 2 \\
Row 7, Col 1 & Row 7, Col 2 \\
Row 8, Col 1 & Row 8, Col 2 \\
Row 9, Col 1 & Row 9, Col 2 \\
Row 10, Col 1 & Row 10, Col 2 \\
Row 11, Col 1 & Row 11, Col 2 \\
Row 12, Col 1 & Row 12, Col 2 \\
Row 13, Col 1 & Row 13, Col 2 \\
Row 14, Col 1 & Row 14, Col 2 \\
\end{tblr}\label{a table}
\captionof{table}{tall-tblr}
\end{minipage}
\lipsum[2]
\end{document}
关于你提供的导言区宏包,在TeXLive2024
下,与上述MWE并无冲突,你需要自行二分注释你的宏包,看看究竟是哪两个宏包产生了冲突。
另外本问题注重于 图表混排和caption的排版处理。如果涉及宏包和版本冲突,需要提供新的mwe开新的问题。
问 请问这个如何用latex排版出来?左边是两个子图,右边是单独编号的一个表