Falsch platziertes \omit in der Tabelle

Falsch platziertes \omit in der Tabelle

Hallo, ich bin neu bei Latex und habe eine Tabelle, die immer wieder den Fehler „Misplaced \omit“ ausgibt. Kann mir jemand helfen, das Problem zu identifizieren? Der Code ist unten. Danke

\begin{table}
 \TABLE
{Return Lag and Return Rate Descriptive Statistics for Electronics Dataset \label{tab:testa}}
{\begin{tabular}{lccccccc} \hline
\up \down  & \multicolumn{3}{c}{Return Rate} & \multicolumn{3}{c}{Return Lag} & Total Observations \\ \cline{2-8}
\up \down \multicolumn{1}{c}{Category} & Average & Std. Dev. & Coeff. of Var. & Average & Std. Dev. & Coeff. of Var. \\ \hline
\up Audio & 12\%  & 0.32  & 2.76  & 12.9  & 20.0  & 1.6 &  11,367 \\
    Auto Parts & 14\%  & 0.35  & 2.44  & 21.9  & 54.1  & 2.5  &  7,211 \\
    Cable & 11\%  & 0.31  & 2.91  & 10.9  & 19.8  & 1.8  &  9,398 \\
    Computer & 11\%  & 0.31  & 2.90  & 11.1  & 23.0  & 2.1 & 21,811  \\
    Imaging & 11\%  & 0.31  & 2.92  & 11.8  & 19.9  & 1.7 & 7,823   \\
    Mobile Phone & 16\%  & 0.37  & 2.27  & 28.9  & 74.4  & 2.6  &  3,126 \\
    Phone  & 14\%  & 0.35  & 2.47  & 16.1  & 30.6  & 1.9 & 5,777 \\
    TV    & 8\%   & 0.28  & 3.28  & 11.3  & 21.5  & 1.9 &  9,413  \\
    TV Box & 14\%  & 0.34  & 2.52  & 14.7  & 28.5  & 1.9 & 9,799 \\
\down   \textbf{Sample Average} & \textbf{12\%} & \textbf{0.33} & \textbf{2.72} & \textbf{15.5} & \textbf{32.4} & \textbf{2.0} & \textbf{1,201.05} \\ \hline
    \end{tabular}}%
{}
\end{table}%

Antwort1

Sie können keinen Text in derselben Zelle haben wie ein \multicolumn. Verschieben Sie diesen Text hinein, d. h. transformieren Sie

\up \down \multicolumn{1}{c}{Category}

hinein

\multicolumn{1}{c}{\up \down Category}
\documentclass{article}

\newcommand\up{?}
\newcommand\down{??}

\begin{document}

\begin{tabular}{lccccccc} \hline
  \up \down                              & \multicolumn{3}{c}{Return Rate} & \multicolumn{3}{c}{Return Lag} & Total Observations                                                                \\ \cline{2-8}
  \multicolumn{1}{c}{\up \down Category} & Average                         & Std. Dev.                      & Coeff. of Var. & Average       & Std. Dev.     & Coeff. of Var.                   \\ \hline
  \up Audio                              & 12\%                            & 0.32                           & 2.76           & 12.9          & 20.0          & 1.6          & 11,367            \\
  Auto Parts                             & 14\%                            & 0.35                           & 2.44           & 21.9          & 54.1          & 2.5          & 7,211             \\
  Cable                                  & 11\%                            & 0.31                           & 2.91           & 10.9          & 19.8          & 1.8          & 9,398             \\
  Computer                               & 11\%                            & 0.31                           & 2.90           & 11.1          & 23.0          & 2.1          & 21,811            \\
  Imaging                                & 11\%                            & 0.31                           & 2.92           & 11.8          & 19.9          & 1.7          & 7,823             \\
  Mobile Phone                           & 16\%                            & 0.37                           & 2.27           & 28.9          & 74.4          & 2.6          & 3,126             \\
  Phone                                  & 14\%                            & 0.35                           & 2.47           & 16.1          & 30.6          & 1.9          & 5,777             \\
  TV                                     & 8\%                             & 0.28                           & 3.28           & 11.3          & 21.5          & 1.9          & 9,413             \\
  TV Box                                 & 14\%                            & 0.34                           & 2.52           & 14.7          & 28.5          & 1.9          & 9,799             \\
  \down   \textbf{Sample Average}        & \textbf{12\%}                   & \textbf{0.33}                  & \textbf{2.72}  & \textbf{15.5} & \textbf{32.4} & \textbf{2.0} & \textbf{1,201.05} \\ \hline
\end{tabular}

\end{document}

verwandte Informationen