将表格格式化为彼此下方带有点的表格

将表格格式化为彼此下方带有点的表格

所以我有这个相当复杂的表格,并且我正在尝试格式化单元格,以便一行中的所有点都彼此位于彼此之下。

到目前为止,我尝试编辑“\multicolumn{1}{l}”以包含 siunix 代码以实现适当的格式。这或多或少可以正常工作,但对于字母条目则不行,因为字母条目总是在 之前放置一个 0,.而对于没有 的范围的条目则不行,.而是-

有人知道如何格式化表格以实现所需的结果吗?也许有比单独更改每个多列条目更好的方法?

感谢您的任何想法!Mil

\begin{table}
  \centering
  \caption[Descriptive Statistics for the Employed Scales]{Descriptive Statistics for the Employed Scales\vspace{-0.25cm}}
   \makebox[\textwidth][c]{\begin{tabular}{rrrrrrrrrrrrrrrrrrrrr}
       \toprule
          & \multicolumn{6}{c}{\boldmath{}\textbf{$t_1$}\unboldmath{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{6}{c}{\boldmath{}\textbf{$t_2$}\unboldmath{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{6}{c}{\boldmath{}\textbf{$t_3$}\unboldmath{}} \bigstrut\\
   \cline{2-7}\cline{9-14}\cline{16-21}       &    &    &    & \multicolumn{2}{c}{\textbf{range}} &    &    &    &    &    & \multicolumn{2}{c}{\textbf{range}} &    &    &    &    &    & \multicolumn{2}{c}{\textbf{range}} &  \bigstrut\\
   \cline{5-6}\cline{12-13}\cline{19-20}       & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} & \multicolumn{1}{l}{\textbf{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} & \multicolumn{1}{l}{\textbf{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$M$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textit{\textbf{$SD$}}\unboldmath{}} & \multicolumn{1}{l}{\boldmath{}\textbf{$\alpha$}\unboldmath{}} & \multicolumn{1}{l}{\textbf{pot.}} & \multicolumn{1}{l}{\textbf{actual}} & \multicolumn{1}{l}{\textbf{skew}} \bigstrut\\
       \toprule
       Prompt engagement & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{l}{2.91} & \multicolumn{1}{l}{1.46} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{0-6} & \multicolumn{1}{l}{0-6} & -0.22 & \multicolumn{1}{c}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} &  \bigstrut[t]\\
       Prompt pursuit & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.25} & \multicolumn{1}{l}{0.57} & \multicolumn{1}{l}{.65} & \multicolumn{1}{l}{0-5} & \multicolumn{1}{l}{0-5} & \multicolumn{1}{l}{-0.35} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} \\
       Motivational reg. & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.44} & \multicolumn{1}{l}{1.02} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{} \\
       TV intrinsic & \multicolumn{1}{l}{4.38} & \multicolumn{1}{l}{0.99} & \multicolumn{1}{l}{.89} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.44} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.26} & \multicolumn{1}{l}{0.92} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.03} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.23} & \multicolumn{1}{l}{0.84} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} \\
       TV attainment & \multicolumn{1}{l}{4.45} & \multicolumn{1}{l}{0.93} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.3-6} & \multicolumn{1}{l}{-0.41} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.59} & \multicolumn{1}{l}{0.90} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.55} & \multicolumn{1}{l}{0.85} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.02} \\
       TV instrumental & \multicolumn{1}{l}{5.00} & \multicolumn{1}{l}{0.69} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{3-6} & \multicolumn{1}{l}{-0.38} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.22} & \multicolumn{1}{l}{0.83} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.87} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.26} \\
       Metacognitive mon. & \multicolumn{1}{l}{3.77} & \multicolumn{1}{l}{0.80} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.95} & \multicolumn{1}{l}{0.70} & \multicolumn{1}{l}{.80} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.6} & \multicolumn{1}{l}{-0.46} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.96} & \multicolumn{1}{l}{0.68} & \multicolumn{1}{l}{.86} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.7} & \multicolumn{1}{l}{-0.75} \\
       Metacognitive reg. & \multicolumn{1}{l}{4.22} & \multicolumn{1}{l}{0.66} & \multicolumn{1}{l}{.81} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2.1-6} & \multicolumn{1}{l}{-0.03} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.05} & \multicolumn{1}{l}{0.75} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.6-6} & \multicolumn{1}{l}{-0.13} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.17} & \multicolumn{1}{l}{0.68} & \multicolumn{1}{l}{.88} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5.9} & \multicolumn{1}{l}{-0.61} \\
       Persistence & \multicolumn{1}{l}{4.49} & \multicolumn{1}{l}{0.67} & \multicolumn{1}{l}{.75} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{3-6} & \multicolumn{1}{l}{0.08} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.16} & \multicolumn{1}{l}{0.81} & \multicolumn{1}{l}{.80} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.14} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.72} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.7-6} & \multicolumn{1}{l}{-0.29} \\
       Elaboration & \multicolumn{1}{l}{4.28} & \multicolumn{1}{l}{0.80} & \multicolumn{1}{l}{.82} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.4-6} & \multicolumn{1}{l}{-0.05} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.05} & \multicolumn{1}{l}{0.85} & \multicolumn{1}{l}{.86} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.6-6} & \multicolumn{1}{l}{-0.13} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.12} & \multicolumn{1}{l}{0.84} & \multicolumn{1}{l}{.89} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.8-6} & \multicolumn{1}{l}{-0.08} \\
       Perform. Approach & \multicolumn{1}{l}{3.51} & \multicolumn{1}{l}{1.19} & \multicolumn{1}{l}{.90} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.36} & \multicolumn{1}{l}{1.21} & \multicolumn{1}{l}{.95} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.01} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.42} & \multicolumn{1}{l}{1.22} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.20} \\
       Perform. Avoidance & \multicolumn{1}{l}{3.83} & \multicolumn{1}{l}{1.24} & \multicolumn{1}{l}{.92} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.33} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.71} & \multicolumn{1}{l}{1.25} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.30} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.71} & \multicolumn{1}{l}{1.28} & \multicolumn{1}{l}{.94} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.47} \\
       Mastery Approach & \multicolumn{1}{l}{4.48} & \multicolumn{1}{l}{0.76} & \multicolumn{1}{l}{.76} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2-6} & \multicolumn{1}{l}{-0.22} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.34} & \multicolumn{1}{l}{0.75} & \multicolumn{1}{l}{.77} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{2-6} & \multicolumn{1}{l}{-0.14} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.18} & \multicolumn{1}{l}{0.74} & \multicolumn{1}{l}{.79} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.28} \\
       Mastery Avoidance & \multicolumn{1}{l}{4.10} & \multicolumn{1}{l}{0.87} & \multicolumn{1}{l}{.74} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.18} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.23} & \multicolumn{1}{l}{0.78} & \multicolumn{1}{l}{.74} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1.3-6} & \multicolumn{1}{l}{-0.24} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{4.09} & \multicolumn{1}{l}{0.82} & \multicolumn{1}{l}{.76} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.31} \\
       Boredom & \multicolumn{1}{l}{2.02} & \multicolumn{1}{l}{0.88} & \multicolumn{1}{l}{.73} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-5} & \multicolumn{1}{l}{0.72} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{2.92} & \multicolumn{1}{l}{1.02} & \multicolumn{1}{l}{.87} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.32} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{2.92} & \multicolumn{1}{l}{0.94} & \multicolumn{1}{l}{.85} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{0.43} \\
       Pleasure & \multicolumn{1}{l}{4.65} & \multicolumn{1}{l}{0.96} & \multicolumn{1}{l}{.85} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.58} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.58} & \multicolumn{1}{l}{0.89} & \multicolumn{1}{l}{.84} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.22} & \multicolumn{1}{l}{} & \multicolumn{1}{l}{3.55} & \multicolumn{1}{l}{0.91} & \multicolumn{1}{l}{.82} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{1-6} & \multicolumn{1}{l}{-0.48\vspace{0.2cm}} \\
       \toprule
       \multicolumn{21}{l}{\hspace{0.9cm}\vspace{-0.5cm}\footnotesize \textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
       }
        \bigstrut[t]\\
       \end{tabular}%
       }
  \label{tab:scales}%
\end{table}  

在此处输入图片描述

答案1

该表不适合放在页面上,但您可以尝试一下。

你的第一个问题已得到解答\sisetup{add-integer-zero=false},第二个问题已得到解答,例如这里或者这里或者这里

% arara: pdflatex

\documentclass{article}
\usepackage{caption}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{threeparttable}
\usepackage{multirow}
\usepackage{mathtools}

\begin{document}
\begin{table}
\begin{threeparttable}
  \centering
  \caption[Descriptive Statistics for the Employed Scales]{Descriptive Statistics for the Employed Scales}
    \sisetup{add-integer-zero=false}
  \begin{tabular}{
    l
    *{2}S[table-format=1.2]
    S[table-format=0.2]
    cc
    S[table-format=-1.2]
    *{2}S[table-format=1.2]
    S[table-format=0.2]
    cc
    S[table-format=-1.2]
    *{2}S[table-format=1.2]
    S[table-format=0.2]
    cc
    S[table-format=-1.2]}
   \toprule
    & \multicolumn{6}{c}{$\boldsymbol{t_1}$} & \multicolumn{6}{c}{$\boldsymbol{t_2}$} & \multicolumn{6}{c}{$\boldsymbol{t_3}$}\\
   \cmidrule(r){2-7}\cmidrule(lr){8-13}\cmidrule(l){14-19}      
& & & & \multicolumn{2}{c}{\textbf{range}} & & & & & \multicolumn{2}{c}{\textbf{range}} & & & & & \multicolumn{2}{c}{\textbf{range}} & \\
 \cmidrule{5-6}\cmidrule{11-12}\cmidrule{17-18}       
& $\boldsymbol{M}$ & $\boldsymbol{SD}$ &$\boldsymbol{\alpha}$ & \textbf{pot.} & \textbf{actual} & \textbf{skew} & $\boldsymbol{M}$ & $\boldsymbol{SD}$ & $\boldsymbol{\alpha}$ & \textbf{pot.} & \textbf{actual} & \textbf{skew} & $\boldsymbol{M}$ & $\boldsymbol{SD}$ & $\boldsymbol{\alpha}$ & \textbf{pot.} & \textbf{actual} & \textbf{skew}  \\
       \midrule
       Prompt engagement & & & & & & & 2.91 & 1.46 & .90 & 0--6 & 0.0--6.0 & -0.22 & & & & & & \\
       Prompt pursuit & & & & & & & 3.25 & 0.57 & .65 & 0--5 & 0.0--5.0 & -0.35 & & & & & & \\
       Motivational reg. & & & & & & & 3.44 & 1.02 & .87 & 1--6 & 1.0--6.0 & -0.18 & & & & & & \\
       TV intrinsic & 4.38 & 0.99 & .89 & 1--6 & 1.0--6 & -0.44 & 3.26 & 0.92 & .88 & 1--6 & 1.0--6.0 & 0.03 & 3.23 & 0.84 & .87 & 1--6 & 1.0--6.0 & -0.18 \\
       TV attainment & 4.45 & 0.93 & .90 & 1--6 & 1.3--6 & -0.41 & 3.59 & 0.90 & .90 & 1--6 & 1.0--6.0 & 0.01 & 3.55 & 0.85 & .90 & 1--6 & 1.0--6.0 & 0.02 \\
       TV instrumental & 5.00 & 0.69 & .79 & 1--6 & 3.0--6 & -0.38 & 4.22 & 0.83 & .81 & 1--6 & 1.0--6.0 & -0.31 & 4.12 & 0.87 & .87 & 1--6 & 1.0--6.0 & -0.26 \\
       Metacognitive mon. & 3.77 & 0.80 & .81 & 1--6 & 1.0--6 & -0.31 & 3.95 & 0.70 & .80 & 1--6 & 1.0--5.6 & -0.46 & 3.96 & 0.68 & .86 & 1--6 & 1.0--5.7 & -0.75 \\
       Metacognitive reg. & 4.22 & 0.66 & .81 & 1--6 & 2.1--6 & -0.03 & 4.05 & 0.75 & .88 & 1--6 & 1.6--6.0 & -0.13 & 4.17 & 0.68 & .88 & 1--6 & 1.0--5.9 & -0.61 \\
       Persistence & 4.49 & 0.67 & .75 & 1--6 & 3.0--6 & 0.08 & 4.16 & 0.81 & .80 & 1--6 & 1.0--6.0 & -0.14 & 4.12 & 0.72 & .79 & 1--6 & 1.7--6.0 & -0.29 \\
       Elaboration & 4.28 & 0.80 & .82 & 1--6 & 1.4--6 & -0.05 & 4.05 & 0.85 & .86 & 1--6 & 1.6--6.0 & -0.13 & 4.12 & 0.84 & .89 & 1--6 & 1.8--6.0 & -0.08 \\
       Perform. Approach & 3.51 & 1.19 & .90 & 1--6 & 1.0--6 & -0.01 & 3.36 & 1.21 & .95 & 1--6 & 1.0--6.0 & -0.01 & 3.42 & 1.22 & .94 & 1--6 & 1.0--6.0 & -0.20 \\
       Perform. Avoidance & 3.83 & 1.24 & .92 & 1--6 & 1.0--6 & -0.33 & 3.71 & 1.25 & .94 & 1--6 & 1.0--6.0 & -0.30 & 3.71 & 1.28 & .94 & 1--6 & 1.0--6.0 & -0.47 \\
       Mastery Approach & 4.48 & 0.76 & .76 & 1--6 & 2.0--6 & -0.22 & 4.34 & 0.75 & .77 & 1--6 & 2.0--6.0 & -0.14 & 4.18 & 0.74 & .79 & 1--6 & 1.0--6.0 & -0.28 \\
       Mastery Avoidance & 4.10 & 0.87 & .74 & 1--6 & 1.0--6 & -0.18 & 4.23 & 0.78 & .74 & 1--6 & 1.3--6.0 & -0.24 & 4.09 & 0.82 & .76 & 1--6 & 1.0--6.0 & -0.31 \\
       Boredom & 2.02 & 0.88 & .73 & 1--6 & 1.0--5 & 0.72 & 2.92 & 1.02 & .87 & 1--6 & 1.0--6.0 & 0.32 & 2.92 & 0.94 & .85 & 1--6 & 1.0--6.0 & 0.43 \\
       Pleasure & 4.65 & 0.96 & .85 & 1--6 & 1.0--6 & -0.58 & 3.58 & 0.89 & .84 & 1--6 & 1.0--6.0 & -0.22 & 3.55 & 0.91 & .82 & 1--6 & 1.0--6.0 & -0.48 \\
       \bottomrule
       \end{tabular}
            \begin{tablenotes}
            \item \footnotesize\textit{Note.} $N=330$ in $t_1$; $N=328$ in $t_2$; $N=298$ in $t_3$. $\alpha$ represents Cronbach's Alpha. Prompt pursuit is presented as a global scale.
            \end{tablenotes}
  \label{tab:scales}%
\end{threeparttable}  
\end{table}
\end{document}

在此处输入图片描述

相关内容