为什么当我删除最后一列时它会在表格中重叠?

为什么当我删除最后一列时它会在表格中重叠?

基本上,我想删除最后一列“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}

相关内容