0

I've got a problem with multicolumn. I have a big table and when I use the command as below I get the following error:

Misplaced \omit. \multispan ->\omit   \@multispan l.468 \end{tabular}} 

I have reported below the only line in which if I delete the \multicolumn{1}{l}{\textbf{ADCS}} and replace it with only \textbf{ADCS} everything works.

I have other lines that have the same format of this one and they don't give me any mistake ( like the one below \multicolumn{1}{l}{\textbf{Payload}} & & & \textbf{5} & \textbf{20} & \textbf{1} & \textbf{6} \\ )

Do you have any idea why it does so?

\begin{table}[h!] 
\resizebox{\textwidth}{!}{% 
\centering \begin{tabular}{r c c c c c r} 
     \midrule 
     \multicolumn{1}{l}{\textbf{ADCS}} & & & \textbf{2.278} & \textbf{5} & 
    \textbf{0.114} & \textbf{2.392} \\ 
\midrule 
    \midrule
    \multicolumn{1}{l}{\textbf{Payload}} &  &  & \textbf{5} & \textbf{20} & \textbf{1} & \textbf{6} \\   
    \midrule     
\end{tabular}}
 \caption{\label{tab:list_equipment} List of equipment} 
\end{table}

Preamble:

% ==================== DOCUMENT CLASS ==================== %
\documentclass[a4paper,11pt]{report}
% ==================== PACKAGES ==================== %
\usepackage[portrait]{geometry}
\usepackage[myheadings]{fullpage}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{gensymb}
\usepackage{titlesec}

\usepackage{fancyhdr}

\usepackage[page,header]{appendix}
\usepackage{lastpage}
\usepackage{changepage}

\usepackage{nccmath}
\usepackage{amsmath,amssymb}
\usepackage{numprint}

\usepackage{graphicx, wrapfig}

\usepackage{tikz}

\usepackage{subfig}
\usepackage{wrapfig}
\usepackage{lipsum}

\usepackage{longtable}

\usepackage{hyperref}

\usepackage{color}

\usepackage[font=small, labelfont=bf]{caption}
\usepackage{fourier}
\usepackage[protrusion=true, expansion=true]{microtype}
\usepackage[english]{babel}
\usepackage{sectsty}
\usepackage{url, lipsum}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{multirow}
3

2 Answers 2

1

it is not clear if the answer of user165329 is real answer or is actually part of question. anyway, this table can be formatted (to my taste, of course) on better way:

enter image description here

\documentclass[a4paper,11pt]{report}
\usepackage{booktabs, makecell}
\renewcommand\theadfont{\bfseries\footnotesize}
\renewcommand\theadgape{}
\newcommand{\mcl}[1]{\multicolumn{1}{l}{\textbf{#1}}}
\usepackage{siunitx}
\usepackage{etoolbox}
\newrobustcmd{\B}{\bfseries}


%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
    \begin{table}[htb]
    \small
    \sisetup{detect-weight}
    \setlength\tabcolsep{0pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}
                            r
                            S[table-format=2.0]
                       *{2}{S[table-format=1.4]}
                            S[table-format=1.3]
                            S[table-format=1.5]
                            S[table-format=1.3]
                            }
    \toprule
\thead{FUNCTIONAL\\ SUBSYSTEM}
& {\thead{\#}}
& {\thead{Mass {[kg]}\\ per unit}}
& {\thead{Total\\ Mass {[kg]}}}
& {\thead{Margin\\ {[\%]}}}
& {\thead{Margin\\ {[kg]}}}
& {\thead{Mass {[kg]}\\ with Margin}}                                               \\
    \midrule
\mcl{Payload}       &       &           & \B        & \B 2  & \B 1      & \B 6      \\
    \midrule
    Detector        & 5     & 1         & 5         & 20    & 1         & 6         \\
    \midrule
\textbf{ADCS}       &       &           & \B 2.278  & \B 5  & \B 0.114  & \B 2.392  \\
    \midrule
Reaction Wheel      & 4     & 0.24      & 0.96      & 5     & 0.048     & 1.008     \\
Fine Sun Sensor     & 2     & 0.0037    & 0.0074    & 5     & 0.0004    & 0.008     \\
Coarse Sun Sensor   & 10    & 0.01      & 0.1       & 5     & 0.005     & 0.105     \\
Magnetometer        & 2     & 0.1       & 0.2       & 5     & 0.01      & 0.210     \\
Magnetic Torquer    & 3     & 0.3       & 0.9       & 5     & 0.045     & 0.945     \\
GPS                 & 2     & 0.0003    & 0.0006    & 5     & 0.00003   & 0.001     \\
IMU                 & 2     & 0.055     & 0.11      & 5     & 0.0055    & 0.116     \\
    \midrule \mcl{Communication} &       &           & \B 0.856  & \B 5  & \B 0.043  & \B 0.899  \\
    \midrule
Patch Antenna       & 2     & 0.08      & 0.16      & 5     & 0.008     & 0.168     \\
Eyestar Antenna     & 2     & 0.143     & 0.286     & 5     & 0.0143    & 0.300     \\
Transciever         & 1     & 0.42      & 0.42      & 5     & 0.021     & 0.441     \\
    \midrule
\mcl{Propulsion}    &       &           & \B 2.480  & \B 6.613  & \B 0.164  & \B 2.644  \\
    \midrule
20N Thruster        & 1     & 0.65      & 0.65      & 5     & 0.0325    & 0.683         \\
Tank                & 1     & 1.3       & 1.3       & 5     & 0.065     & 1.365         \\
Feeding Lines       & /     & 0.2       & 0.2       & 25    & 0.05      & 0.250         \\
Pyrotechnical Valve & 1     & 0.15      & 0.15      & 5     & 0.00075   & 0.158         \\
 Fill \& Drain Valve    & 2 & 0.09      & 0.18      & 5     & 0.009     & 0.189         \\
    \midrule
\mcl{OBDH}          &       &           &           &       &           &               \\
    \midrule
\mcl{Structure}     &       &           &           &       &           &               \\
    \midrule
\mcl{Thermal Control}   &   &           &           &       &           &               \\
\mcl{EPS}           &       &           &           &       &           &               \\
\mcl{Harness}       &       &           &           &       &           &               \\
    \midrule
Propellant          &       &           &           &       &           &               \\
Pressurizer         &       &           &           &       &           &               \\
    \midrule
\mcl{Grand Total}   &       &           &           &  \textbf{kg} &    &               \\
    \bottomrule
\end{tabular*}
\caption{ List of equipment}
\label{tab:list_equipment}
    \end{table}
\end{document}
0

Hum. Nothing Minimal in your preamble. Not really a Working example either. A MWE could look like

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\usepackage{booktabs,tabularx,multirow}
\begin{document}
\begin{tabular}{r c c c c c r}
\toprule
\multicolumn{1}{l}{\textbf{ADCS}} & & & \textbf{2.278} & \textbf{5} & \textbf{0.114} & \textbf{2.392} \\
\midrule
\multicolumn{1}{l}{\textbf{Payload}} &  &  & \textbf{5} & \textbf{20} & \textbf{1} & \textbf{6} \\
\bottomrule
\end{tabular}
\end{document} 

which compiles fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .