# Can't compile a table due to a “Misplaced \omit” error message

I am writing a table in LaTeX and when I compile an error message is displayed:

Error Misplaced \omit. \end{tabular}}.

Could anyone help me to fix it?

\begin{table}[H]
\centering
\caption{TGA/DTGA reaction intervals, peak temperatures and mass losses of oil shale combustion}
\resizebox{15cm}{2cm}{
\begin{tabular}{c c c c c c c}
\toprule
&\multicolumn{2}{c}{Second stages} \multicolumn{5}{c}{Third stages}\\
\cmidrule(l{2pt}r{2pt}){2-4} \cmidrule(l{2pt}r{2pt}){5-7}
\bfseries{$\beta$($^o$C min$^{-1}$)}&\bfseries{Interval($^o$C)}& \bfseries{T$_{max}$$^a$($^o$C)}&\bfseries{loss(\%)}&\bfseries{Interval($^o$C)}&\bfseries{T$_{max}$($^o$C)}&\bfseries{loss(\%)}\\
\midrule
5& 230$-$533 & 387 & 15.2 & 533$-$924 & 593 and 679 & 7.5 \\
10& 250$-$546 & 402 & 15.0 & 546$-$944 & 612 and 693 & 7.4 \\
20& 255$-$567 & 414  & 15.4 & 567$-$940 & 629 and 710 & 7.2  \\
30& 262$-$571 & 423 & 15.3 & 571$-$949  & 639 and 721 & 6.9 \\
40& 274$-$572 & 437 and 453 & 15.5 & 572$-$942 & 649 and 732 & 6.8 \\
50& 273$-$576 & 451 & 15.6 & 576$-$948 & 649 and 741& 6.7 \\
\bottomrule
\end{tabular}}\\\smallskip
\parbox{0.85\textwidth}{\scriptsize{$^a$The temperature at which the maximum mass loss rate reached}}
\label{TGAtable}
\end{table}

• Use the & between the \multicolumn, not before. – TeXnician Dec 5 '17 at 17:16
• Btw: \bfseries has no argument. – TeXnician Dec 5 '17 at 17:16
• also don't use \\  before vertical skips and if you can avoid it at all, avoid scaling the table (never use both scale arguments as that scales it by different amounts in each direction, completely destroying the font) – David Carlisle Dec 5 '17 at 17:44
• – Schweinebacke Dec 5 '17 at 17:54

Your \multicolumn statements contain several errors; I hope I managed to fix them in the code shown below.

Do give more thought to organizing the header material. E.g., instead of showing both variables and their units on one and the same line, split the information across two lines. This'll make it much easier on your readers to figure out the structure of the table. To typeset en-dashes, use --, not $-$ (math-minus symbol). Don't overuse bold-facing. For sure, don't even think about using bold-facing as a substitute for organizing the tabular material in a clear and crisp way. I would also like to recommend that you familiarize yourself with the threeparttable package, which is very useful for typesetting table-related footnotes and placing various markers in the body of the tabular environment.

Observe that the code below gets by without a call to \resizebox, and that it doesn't resort to bold-facing at all. Just for completeness, I'm also showing the table as produced by your code, fixed up minimally to make it compilable without errors.

\documentclass{article}
\usepackage{booktabs,siunitx}
\usepackage[skip=0.333\baselineskip]{caption}
\usepackage[flushleft]{threeparttable} % for \tnote macro and \tablenotes env.
\renewcommand{\TPTtagStyle}{\textit}

\begin{document}

\begin{table}[ht!]
\centering
\begin{threeparttable}
\caption{TGA/DTGA reaction intervals, peak temperatures and mass losses of oil shale combustion}
\label{TGAtable}

\begin{tabular}{@{} S[table-format=2.0] *{6}{c} @{}}
\toprule
&\multicolumn{3}{c}{Second stages}
&\multicolumn{3}{c@{}}{Third stages}\\
\cmidrule(lr){2-4} \cmidrule(l){5-7}
{$\beta$}
& Interval & $T_{\max}$\tnote{a} & loss
& Interval & $T_{\max}$\tnote{a} & loss\\
{(\si{\celsius\per\minute})}
& (\si{\celsius}) & (\si{\celsius}) & (\%)
& (\si{\celsius}) & (\si{\celsius}) & (\%)\\
\midrule
5& 230--533 & 387 & 15.2 & 533--924 & 593 \& 679 & 7.5 \\
10& 250--546 & 402 & 15.0 & 546--944 & 612 \& 693 & 7.4 \\
20& 255--567 & 414 & 15.4 & 567--940 & 629 \& 710 & 7.2  \\
30& 262--571 & 423 & 15.3 & 571--949 & 639 \& 721 & 6.9 \\
40& 274--572 & 437 \& 453 & 15.5 & 572--942 & 649 \& 732 & 6.8 \\
50& 273--576 & 451 & 15.6 & 576--948 & 649 \& 741 & 6.7 \\
\bottomrule
\end{tabular}

\footnotesize
\begin{tablenotes}
\item[a] The temperature at which the maximum mass loss rate is reached.
\end{tablenotes}
\end{threeparttable}
\end{table}

\end{document}

• Hello, sorry i can't install the \usepackage[flushleft]{threeparttable}. The program said that the package was not found. – Martín Torres Brunengo Dec 26 '17 at 13:56
• @MartínTorresBrunengo - The package to install is called threeparttable, not \usepackage[flushleft]{threeparttable}. If your TeX distribution cannot locate the threeparttable package, I'm afraid there's something very odd about the installation of your TeX distribution. Which TeX distribution do you have? – Mico Dec 26 '17 at 14:02
• I have the TeXstudio. Regrettably the program don't install the package, the program display the following message: File `threeparttable.sty' not found. Would you mind telling me a possible solution? – Martín Torres Brunengo Dec 26 '17 at 14:12
• @MartínTorresBrunengo - TeXstudio is a "front end", it is not a TeX distribution. Examples of TeX distributions are TeXLive and MiKTeX. – Mico Dec 26 '17 at 14:15
• Yes! sorry, i am using MiKTex. – Martín Torres Brunengo Dec 26 '17 at 14:21