如何避免并排表格的标题重叠?

如何避免并排表格的标题重叠?

我试图让两张桌子并排在此处输入链接描述。但是表格的标题很长,似乎重叠/接触。如何避免这种情况?

重叠点如图: 在此处输入图片描述

\documentclass{article}
\usepackage{subcaption}
\begin{document}

\begin{table}[!htb]
    \caption{Experimental setup for testing testing testing testing testing}
    \begin{subtable}{.5\linewidth}
      \centering
      \caption{Experimental setup for testing testing testing testing testing}
        \begin{tabular}{ll}
            1 & 2
        \end{tabular}
    \end{subtable}%
    \begin{subtable}{.5\linewidth}
      \centering
      \caption{Experimental setup for testing testing testing testing testing}
        \begin{tabular}{ll}
            3 & 4
        \end{tabular}
    \end{subtable} 
\end{table}

\end{document}

答案1

这与您的预期有些接近吗?

\documentclass{article}
\usepackage{subcaption}
 \usepackage{amsmath}
      \usepackage{amsfonts}
      \usepackage{amssymb}
\begin{document}
\begin{table}[!htb]
    \caption{Experimental setup for testing testing testing testing testing}
    \begin{subtable}{.45\linewidth}
      \centering
      \caption{Experimental setup for testing testing testing testing testing}
        \begin{tabular}{ll}
            1 & 2
        \end{tabular}
    \end{subtable}\hfill
    \begin{subtable}{.45\linewidth}
      \centering
      \caption{Experimental setup for testing testing testing testing testing}
        \begin{tabular}{ll}
            3 & 4
        \end{tabular}
    \end{subtable} 
\end{table}

\end{document}

在此处输入图片描述

相关内容