如何调整上行的大小,将多行单元格中的文本对齐到中心(例如,图像中的数字“100”),并在单元格内插入两行而不超出页面边界?
\documentclass[twocolumn]{article}
\usepackage{multirow}
\begin{document}
\begin{table*}
\centering
\begin{tabular}{|l|l|c|c|c|c|c|} \hline
\multicolumn{2}{|c|}{\textbf{Size/Metrics/Methods}} &\textbf{Base Line 1} &\textbf{Base Line 2} &\textbf{Base Line 3} &\textbf{Base Line 4} &\textbf{Proposed ABCDEFGHIJKLMNO}\\ \hline
\multirow{4}{4em}{100}
& Reference 1 & 0.153& 0.203& 0.465& 0.239& 0.052
\\
& Reference 2 & 0.362& 0.107& 0.121& 0.123& 0.023
\\
& Reference 3 & 0.234& 0.234& 0.523& 0.127& 0.327
\\
& Reference 4 & 0.321& 0.128& 0.237& 0.320& 0.016
\\ \hline
\end{tabular}
\end{table*}
\end{document}
答案1
与。{NiceTabular}
nicematrix
\documentclass[twocolumn,landscape]{article}
\usepackage{nicematrix}
\begin{document}
\begin{table*}
\centering
\begin{NiceTabular}{llccccc}[vlines] \hline
\multicolumn{2}{c}{\bfseries Size/Metrics/Methods} &
\RowStyle[cell-space-limits=2pt]{\bfseries} Base Line 1 &Base Line 2 &Base Line 3 &Base Line 4 & \Block{}{Proposed\\ ABCDEFGHIJKLMNO}\\ \hline
\Block{4-1}{100}
& Reference 1 & 0.153& 0.203& 0.465& 0.239& 0.052
\\
& Reference 2 & 0.362& 0.107& 0.121& 0.123& 0.023
\\
& Reference 3 & 0.234& 0.234& 0.523& 0.127& 0.327
\\
& Reference 4 & 0.321& 0.128& 0.237& 0.320& 0.016
\\ \hline
\end{NiceTabular}
\end{table*}
\end{document}
答案2
我不能说它一定会起作用,但我会尝试:
\begin{tabular}{|l|l|c|c|c|c|c|} \hline\
\vspace{6pt}
\multicolumn{2}{|c|}{\textbf{Size/Metrics/Methods}} &\textbf{Base Line 1} &\textbf{Base Line 2} &\textbf{Base Line 3} &\textbf{Base Line 4} &\textbf{Proposed ABCDEFGHIJKLMNO}\\\
\vspace{6pt}
\hline