Lỗi! Thiếu \ endgroup được chèn

Sep 09 2020

Tôi đang cố gắng biên dịch một bảng bao gồm ba bảng r từ gói semtable. rất tiếc, tôi gặp lỗi! Thiếu \ endgroup được chèn. \ endgroup & đa cột {4} {c} {A & N} .

Đây là mã của tôi:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{siunitx}
\begin{document}

\begin{tabular}{@{}r*{12}{S[
                         input-symbols = ( ) +,
                         group-digits = false,
                         table-number-alignment = center,
                         %table-space-text-pre = (,
                         table-align-text-pre = false,
                         table-align-text-post = false,
                         table-space-text-post = {***},
                         parse-units = false]}@{}}
& \multicolumn{4}{c}{A & N}& \multicolumn{4}{c}{A, N & E}& \multicolumn{4}{c}{A, N & E & control}\tabularnewline \hline
& \multicolumn{1}{c}{Estimate}& \multicolumn{1}{c}{Std. Err.}& \multicolumn{1}{c}{z}& \multicolumn{1}{c}{p}& \multicolumn{1}{c}{Estimate}& \multicolumn{1}{c}{Std. Err.}& \multicolumn{1}{c}{z}& \multicolumn{1}{c}{p}& \multicolumn{1}{c}{Estimate}& \multicolumn{1}{c}{Std. Err.}& \multicolumn{1}{c}{z}& \multicolumn{1}{c}{p}\tabularnewline\hline
& \multicolumn{9}{c}{\underline{Factor Loadings}}\tabularnewline \multicolumn{1}{l}{\underline{ABU}}\tabularnewline
NoSKMSM& 1.00$^+$& & & & 1.00$^+$& & & & 1.00$^+$& & & \tabularnewline
KSMChrMX& 0.71& 0.03& 22.62& .000& 0.73& 0.04& 20.38& .000& 0.73& 0.04& 19.89& .000\tabularnewline
KSMSevMx& 0.69& 0.03& 25.22& .000& 0.69& 0.03& 23.08& .000& 0.69& 0.03& 22.51& .000\tabularnewline
& \multicolumn{9}{c}{\underline{Fit Indices}}\tabularnewline
$\chi^{2}(\mathrm{df})$& 67.42& & & & 75.22& & & & 133.77& & & \tabularnewline
CFI& 0.99& & & & 1.00& & & & 1.00& & & \tabularnewline
RMSEA& 0.03& & & & 0.01& & & & 0.02& & & \tabularnewline
SRMR& 0.06& & & & 0.05& & & & 0.11& & & \tabularnewline
Scaled $\chi^{2}(\mathrm{df})$& 96.70(45)& & & .000& 135.52(71)& & & .000& 226.51(104)& & & .000\tabularnewline
\hline_BOML10_$^+$Fixed parameter}\tabularnewline
\end{tabular}
\end{document}

Cám ơn vì đã nhiệt tình hướng dẫn!

Trả lời

1 Zarko Sep 09 2020 at 15:51

Tôi đoán rằng bạn đang tìm kiếm một số thứ như thế này:

Như bạn có thể thấy, bảng được xoay, vì nó rộng, có thể vừa với trang theo hướng dọc. Tôi cố gắng tìm ra mã của bạn, nhưng tôi không chắc liệu có may mắn không vì mọi sự mơ hồ và lỗi trong mã của bạn. Tôi cũng thay đổi trang bằng cách sử dụng geometrygói và bố cục bảng bằng cách sử dụng các quy tắc từ booktabsgói thay vì \hline:

\documentclass[10pt,a4paper]{article}
\usepackage{geometry}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{siunitx}


\begin{document}
    \begin{sidewaystable}
\begin{tabular}{@{}r *{3}{S[table-format=3.2(3),
                            table-space-text-post = $^{+}$,
                            table-align-text-post = false]
                          S[table-format=1.2]
                          S[table-format=2.2]
                          S[table-format=1.3]}
                @{}}
    \toprule
    & \multicolumn{4}{c}{A \& N}
        & \multicolumn{4}{c}{A, N \& E}
            & \multicolumn{4}{c}{A, N \& E \& control}  \tabularnewline
    \cmidrule(l){2-5}
    \cmidrule(l){6-9}
    \cmidrule(l){10-13}
    & {Estimate}
        & {Std. Err.}
            & {z}
                & {p}
                    & {Estimate}
                        & {Std. Err.}
    & {z}
        & {p}
            & {Estimate}
                & {Std. Err.}
                    & {z}
                        & {p}                           \tabularnewline
    \midrule
    & \multicolumn{12}{c}{\textbf{Factor Loadings}}     \tabularnewline
%\multicolumn{1}{l}{\underline{ABU}}                     \tabularnewline
NoSKMSM
        & 1.00$^+$  & & & & 1.00$^+$ & & & & 1.00$^+$ & & & \tabularnewline
KSMChrMX
        & 0.71 & 0.03 & 22.62 & 0.000& 0.73 & 0.04 & 20.38 & .000 & 0.73 & 0.04 & 19.89& .000 \tabularnewline
KSMSevMx& 0.69& 0.03& 25.22& .000& 0.69& 0.03& 23.08& .000& 0.69& 0.03& 22.51& .000 \tabularnewline
    \midrule
    & \multicolumn{12}{c}{\textbf{Fit Indices}}         \tabularnewline
$\chi^{2}(\mathrm{df})$
        & 67.42 & & & & 75.22   & & & & 133.77  & & &   \tabularnewline
CFI     & 0.99  & & & & 1.00    & & & & 1.00    & & &   \tabularnewline
RMSEA   & 0.03  & & & & 0.01    & & & & 0.02    & & &   \tabularnewline
SRMR    & 0.06  & & & & 0.05    & & & & 0.11    & & &   \tabularnewline
Scaled $\chi^{2}(\mathrm{df})$
        & 96.70(45) & & & 0.000 & 135.52(71) & & & 0.000 & 226.51(104) & & & 0.000   \tabularnewline
    \bottomrule
\multicolumn{13}{l}{BOML10$^+$Fixed parameter}
\end{tabular}
    \end{sidewaystable}
\end{document}