![为什么当我删除最后一列时它会在表格中重叠?](https://linux22.com/image/405522/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%BD%93%E6%88%91%E5%88%A0%E9%99%A4%E6%9C%80%E5%90%8E%E4%B8%80%E5%88%97%E6%97%B6%E5%AE%83%E4%BC%9A%E5%9C%A8%E8%A1%A8%E6%A0%BC%E4%B8%AD%E9%87%8D%E5%8F%A0%EF%BC%9F.png)
基本上,我想删除最后一列“BCa 95 \%差异的置信区间”。
当我取消以下操作时:
& \multicolumn{1}{>{\centering\arraybackslash}p{8em}}{\textbf{BCa 95\% Confidence Interval of the Difference}}
\documentclass[12pt,oneside]{book}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{makecell, multirow, tabularx}
\renewcommand\theadfont{\small\bfseries} % for bold in table using \small
\renewcommand\theadgape{}
\usepackage[svgnames, table]{xcolor}
\usepackage{hhline, boldline}
\usepackage{seqsplit, caption} %for table spacing to second row
\usepackage{booktabs, ragged2e} % Use booktabs rules and get rid of vertical rules, ragged2e to ragged text
\usepackage{siunitx} %for table spacing to second row
\usepackage{threeparttable} %to add footnote below table
\usepackage{tabulary}
\usepackage{graphicx}
\usepackage[font=small,labelfont={bf,sf}, textfont={sf}, justification=centering]{caption}
\usepackage{hyperref}
% \hypersetup{pdfborder = {0 0 0}}
\begin{document}
\begin{table}[h!]
\centering
\begin{threeparttable}
\begin{tabularx}{\textwidth}{>{\RaggedRight\arraybackslash}Xcccccc} % Changed from c to X, or remove >{} and change to `l`column.
\toprule
& \multirow{4.5}{*}{\textbf{Mean}}
& \multirow{4.5}{*}{\textbf{Bias}}
& \multirow{4.5}{*}{\makecell{\textbf{Std.}\\ \textbf{Error}}}
& \multirow{4.5}{*}{\makecell{\textbf{Sig.}\\ \textbf{(2-tailed)}}}
& \multicolumn{1}{>{\centering\arraybackslash}p{8em}}{\textbf{BCa 95\% Confidence Interval of the Difference}}
\\
\midrule
Pair 1\tnote{b}
& 43.33\%
& -0.12\%
& 31.90\%
& 55.16\%\\
\bottomrule
\end{tabularx}
\footnotesize
\begin{tablenotes}
\item[a] Unless otherwise noted, bootstrap results are based on 1000 bootstrap samples
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}
答案1
以下是否满足您的部分要求:
\documentclass[12pt,oneside]{book}
\usepackage[showframe]{geometry}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{makecell, multirow, tabularx}
\usepackage{hhline, boldline}
\usepackage{seqsplit, caption} %for table spacing to second row
\usepackage{booktabs, ragged2e} % Use booktabs rules and get rid of vertical rules, ragged2e to ragged text
\usepackage{siunitx} %for table spacing to second row
\usepackage{threeparttable} %to add footnote below table
\newcommand\tenpow[1]{\ensuremath{{\times}10^{#1}}}
\begin{document}
\begin{table}[h!]
\centering
\begin{threeparttable}
\begin{tabularx}{\textwidth}{@{}
l
l
l
S[table-format=1.2]
S[table-format=2.2]
@{}} % Changed from c to X, or remove >{} and change to `l`column.
\toprule
& & {\textbf{N}} & {\textbf{MeanRank}} & {\makecell{\textbf{Sum of ranks}}} \\
\midrule
\multirow{4}{*}
{Example dataset} & Negative Ranks & 1\tenpow{a} & 5.5 & 55.00 \\
& Positive Ranks & 0 & .00 & .00 \\
& Ties & 0 & & \\
& Tostsl & 1\tenpow{1} & & \\
\bottomrule
\end{tabularx}
\footnotesize
\begin{tablenotes}
\item[a] Unless otherwise noted, bootstrap results are based on 1000 bootstrap samples
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}