如何在表格中创建一条小空白行?因为我的内容与 \bottomrule 重叠

如何在表格中创建一条小空白行?因为我的内容与 \bottomrule 重叠

这是一个后续链接问题如何将内容分成两行

在此处输入图片描述

基本上,我希望在blue line下面留一个小间隙,并且不触及底部规则

在此处输入图片描述

我的完整 MWE:

\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}

\begin{document}

\begin{table}[h!]
\centering
    \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}XXlrr}

    % \begin{tabularx}{\textwidth}{>{\raggedright\arraybackslash}Xrrrrrr}


    \toprule
    & & & \multicolumn{2}{c}{\textbf{Cholestrrol Levellll}} \\
     \cmidrule{4-5}
     & &  & \thead{{\textbf{Equal}} \\ \textbf{variances} \\ \textbf{assumed}}
     & \thead{{\textbf{Equal}} \\ \textbf{variances not} \\ \textbf{assumed}}\\
\midrule

\multirow{3}{=}{Levene's Test for Equality of Variances}

    & F 
    & & 0.314 &   \\
    & Sig. & & 0.579 & \\

\midrule

\multirow{5}{=}{t-test for Equality of Means}


    & t
    & & 2.428 & 2.428   \\
    & df & & 38 & 34.886 \\
    & Sig. (2-tailed) &  & 0.579 & 0.64273\\
    & Mean Difference &  & 0.579 & 0.64273\\
    & Std. Error Difference &  & 0.579 & 0.64273\\
    & \multirow{1.2}{=}{95\% Confidence of Interval of the Difference}  &  Lower & 0.579 & 0.64273\\
    & &  Upper & 0.579 & 0.64273\\
\bottomrule

\end{tabularx}
\end{table}

\end{document} 

答案1

我会进行一些重新设计以避免表格中出现大片空白。以下内容可能适合您的需求:

在此处输入图片描述

\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}

\begin{document}

\begin{table}[h!]
\centering
    \begin{tabularx}{\textwidth}{>{\quad}Xlrr}
    \toprule
     & & \multicolumn{2}{c}{\textbf{Cholestrrol Levellll}} \\
     \cmidrule{3-4}
       &  & \multicolumn{2}{c}{\thead{Equal variances}} \\ 
       &  & \thead{assumed} & \thead{not \\ assumed}\\
\midrule
\multicolumn{4}{@{}l}{Levene's Test for Equality of Variances}\\
     F    & & 0.314 &   \\
     Sig. & & 0.579 & \\
\midrule
\multicolumn{4}{@{}l}{t-test for Equality of Means}\\
     t  & & 2.428 & 2.428   \\
     df & & 38 & 34.886 \\
     Sig. (2-tailed) &  & 0.579 & 0.64273\\
     Mean Difference &  & 0.579 & 0.64273\\
     Std. Error Difference &  & 0.579 & 0.64273\\
     \multirow{2}{=}{95\% Confidence of Interval of the Difference}  &  Lower & 0.579 & 0.64273\\
     &  Upper & 0.579 & 0.64273\\
\bottomrule
\end{tabularx}
\end{table}

\end{document} 

相关内容