如何避免表格溢出(重叠)?

如何避免表格溢出(重叠)?

这是来自 在此处输入链接描述

我想让表格内容分为两行: 在此处输入图片描述

我的 MWE:

\documentclass{article}
\usepackage{amsmath,epsfig,times}

\usepackage{makecell, multirow, tabularx} 
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{seqsplit, caption} 
\usepackage{tabulary,siunitx} 

\begin{document}


\begin{table}[htp!]
\centering
 \begin{tabular}{lll}
    \toprule
\multirow{2.4}{*}{\textbf{Selecting Panel}} & \multicolumn{2}{c}{\textbf{Total Item}}\\ 
     \cmidrule{2-3}
 & {\textbf{Item 1}} & {\textbf{Item 2}} \\
     \midrule
    Stick & Stick Stick Stick & Stick Stick Stick Stick \\
        Stick & Stick Stick Stick & Stick Stick Stick Stick \\
    \bottomrule
    \end{tabular}
\end{table}

\end{document}

答案1

由于您要加载makecell,因此请\multirowthead使用双行列头。

无关:times已过时,因此我newtx基于times克隆 将其替换为TeX Gyre Termes。该 epsfig软件包也已过时,因为您可以使用 获得其功能graphicx

\documentclass[twocolumn]{article}
\usepackage{amsmath, newtxtext, newtxmath}

\usepackage{makecell, multirow, tabularx}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{seqsplit, caption}
\usepackage{tabulary,siunitx}
\usepackage{lipsum}

\renewcommand{\theadfont}{\normalsize\bfseries}
\renewcommand{\theadalign}{lc}

\begin{document}

\lipsum[11]
\begin{table}[htp!]
\centering
 \begin{tabular}{lll}
    \toprule
\multirowthead{2.84}{Selecting\\ Panel} & \multicolumn{2}{c}{\textbf{Total Item}}\\
     \cmidrule{2-3}
 & {\textbf{Item 1}} & {\textbf{Item 2}} \\
     \midrule
    Stick & Stick Stick Stick & Stick Stick Stick Stick \\
        Stick & Stick Stick Stick & Stick Stick Stick Stick \\
    \bottomrule
    \end{tabular}
\end{table}
\lipsum

\end{document} 

在此处输入图片描述

相关内容