我可能错过了,但我在之前的问题档案中找不到答案。我试图制作一个包含两个子表的表,每个子表都有自己的标题,但没有标题。我希望将整个集合视为一个编号表。换句话说,在我当前的代码中,我想保留表 I,并删除表 II 和表 III。此外,每个子表只计算一次,这会弄乱表的编号。
谢谢你,
\documentclass[%
reprint,
%superscriptaddress,
%groupedaddress,
%unsortedaddress,
%runinaddress,
%frontmatterverbose,
%preprint,
%preprintnumbers,
%nofootinbib,
%nobibnotes,
%bibnotes,
amsmath,amssymb,
aps,
%pra,
%prb,
%rmp,
%prstab,
%prstper,
%floatfix,
]{revtex4-2}
%\bibliographystyle{achemso}
\usepackage{mhchem}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{amssymb}% Package to draw a square in the formulas
\usepackage{wasysym}% Package to draw a square in the figures
\usepackage{color}
\usepackage{chemformula}
\usepackage{makecell}
\usepackage{siunitx}
\usepackage{bm}% bold math
\usepackage{booktabs}
\usepackage{filecontents}
\usepackage{lipsum,booktabs}
\begin{document}
\begin{table}[t]
\caption{ Caption for the table. }
\label{table: DFT}
\begin{ruledtabular}
\begin{minipage}{.5\linewidth}
\caption*{Subcaption one}
\centering
\begin{tabular}{c c c c}
Configuration & cell & cell &\\ [.1ex]
\hline \hline \\[0.01ex]
cell & cell & cell& \\
cell & cell & cell &\\ [.1ex]
\end{tabular}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\caption*{Subcaption for table II } \label{table: Exp}
\begin{tabular}{c c c c}
&cell & cell & cell \\ [.1ex]
\hline\hline \\[0.01ex]
&cell & cell & cell \\
&cell & cell & cell \\ [.1ex]
\end{tabular}
\end{minipage}
\end{ruledtabular}
\end{table}
\end{document}
答案1
对于那些有同样问题的人,我找到了以下答案:
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{amssymb}% Package to draw a square in the formulas
\usepackage{wasysym}% Package to draw a square in the figures
\usepackage{color}
\usepackage{chemformula}
\usepackage{makecell}
\usepackage{siunitx}
\usepackage{bm}% bold math
\usepackage{booktabs}
\usepackage{filecontents}
\usepackage{lipsum,booktabs}
\begin{document}
\begin{table}[htb]
\centering
\caption{Caption}
\label{tab:example}
\begin{tabularx}{\linewidth}{ *{6}{>{\centering\arraybackslash}X} }
\toprule
\multicolumn{3}{c}{A} & \multicolumn{3}{c}{B} \\
\cmidrule(r){1-3}
\cmidrule(l){4-6}
Class & Class & Class & Number & Class & Number \\
\midrule
Class & Class & aaa & bbb & ccc & ddd \\
Class & Class & aaa & bbb & ccc & ddd \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}