Apa6 風格對單列使用 \cline

Apa6 風格對單列使用 \cline

我正在尋找一種方法來將 \cline 命令應用於系列中的單列標題。第一張圖表示目前狀態,在此輸入影像描述第二個是實現的外觀在此輸入影像描述

先致謝!

\documentclass[a4paper,man,natbib,donotrepeattitle]{apa6}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,siunitx,booktabs,caption}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{hyperref}
\usepackage[T1]{fontenc}
\usepackage[usestackEOL]{stackengine}
\usepackage{multicol}
\usepackage{multirow}

\begin{table}[H]
\centering
\caption{Demographic Characteristics of the Sample}
\begin{tabular}{ l l l l l l l }
     \hline
              & Total (\textit{n}) & Female (\textit{n}) & Male (\textit{n}) & Age (\textit{M*)} & Age (\textit{SD**)} \\\cline{2-6}
              %\hline\hline 
  First Assessment  &       &        &       &       &              \\\hline       
  Healthy Control   & 102   & 62     & 40    & 61.71 &   8.478 \\       
  PD Patients       & 91    & 36     & 55    & 55    &   9.401 \\       
  Total             & 193   & 98     & 95    & 63.07 &   9.018 \\\hline      
  Second Assessment  &    &     &     &  &                          \\\hline       
  Healthy Control   & 102   & 62     & 40    & 61.71 & 3.1797       \\       
  PD Patients       & 91    & 36     & 55    & 55    & 64.59 &        \\       
  Total             & 193   & 98     & 95    & 63.07 & 4.3299       \\\hline     
\multicolumn{6}{l}{\small\textit{Note.} *$M=\text{mean}$, **$SD=\text{Standart Deviation}$}
\end{tabular}
\label{table:sumfail}
\end{table}

答案1

使用\cmidrule(lr)from booktabs 修剪\cmidrule兩側的 s(或僅修剪第一列的 (r))。此外,規則 frombooktabs有一些垂直填充:

\documentclass[a4paper,man,natbib,donotrepeattitle]{apa6}
\title{test}
\shorttitle{}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{multirow, siunitx, booktabs, caption}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[usestackEOL]{stackengine}
\usepackage{hyperref}

\begin{document}

\begin{table}[H]
\centering
\caption{Demographic Characteristics of the Sample}
\begin{tabular}{*{7}{l}}
     \toprule
              & Total (\textit{n}) & Female (\textit{n}) & Male (\textit{n}) & Age (\textit{M*)} & Age (\textit{SD**)} \\
              \cmidrule(lr){2-2} \cmidrule(lr){3-3}\cmidrule(lr){4-4}\cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(lr){7-7}
  First Assessment & & & & & \\
  \cmidrule(r){1-1}
  Healthy Control & 102 & 62 & 40 & 61.71 & 8.478 \\
  PD Patients & 91 & 36 & 55 & 55 & 9.401 \\
  Total & 193 & 98 & 95 & 63.07 & 9.018 \\\midrule
  Second Assessment & & & & & \\
  \cmidrule(r){1-1}
  Healthy Control & 102 & 62 & 40 & 61.71 & 3.1797 \\
  PD Patients & 91 & 36 & 55 & 55 & 64.59 & \\
  Total & 193 & 98 & 95 & 63.07 & 4.3299 \\
\bottomrule
\multicolumn{6}{l}{\small\textit{Note.} *$M=\text{mean}$, **$SD=\text{Standart Deviation}$}
\end{tabular}
\label{table:sumfail}
\end{table}

\end{document} 

在此輸入影像描述

相關內容