1

I've created three subtables and I'd place them into the page as in the following image: enter image description here

Can you help me ?

In addition, I can't use the correct package. I'm using \usepackage{subcaption} but it seems not to work! This is my code:

\begin{table}

%Subtable 1
\begin{subtable}[b]{0.48\textwidth}
\begin{tabular}{|c|c|}

\hline
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} \textbf{GENERAL}}}    \\ \hline
\textbf{Mass}  & \cellcolor[HTML]{FDDCD3}207 grams                                       \\ \hline
               & \begin{tabular}[c]{@{}c@{}}67 x 69 x 34 mm\\ (electronics)\end{tabular} \\ \cline{2-2} 
\multirow{-2}{*}{\textbf{Dimensions}} & \cellcolor[HTML]{FDDCD3}\begin{tabular}[c]{@{}c@{}}41 x 51 x   15 mm\\ (detector head)\end{tabular} \\ \hline
\textbf{Power} & 2.15 Watts                                                              \\ \hline
\end{tabular}
\end{subtable}

\hspace{\fill}


%Subtable 2
\begin{subtable}[t]
\flushright
\begin{tabular}{|c|c|}
\hline
\rowcolor[HTML]{F54A19} 
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} \textbf{DETECTOR}}}                           \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{CCD full well}                                                                 & 170000 electrons        \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout noise, \\ 55 °C\end{tabular}} & \textless { 37} electrons  \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{CCD Gain, 55 °C}                                                               & 98   electrons/DN       \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}ADC digitization \\ 12 bits/pixel\end{tabular}} & 12 bits/pixel                                                              \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Frame transfer time}                                                           & 5.12 ms                 \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout time,\\ full-frame mode\end{tabular}}   & 5.4   s                 \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout time,\\ 4 x 1 binned mode\end{tabular}} & 1.4 s                   \\ \hline
\textbf{Pixel  size}                                                                   & 12 x12 microns          \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Fill factor}                                                                   & 100\%                   \\ \hline
\textbf{SNR}                                                                           & \textgreater{ 200:1 }    \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Exposure time}                                                             & \begin{tabular}[c]{@{}c@{}}0 –335.5 s, \\ in steps of 5.12 ms\end{tabular} \\ \hline
\end{tabular}
\end{subtable}

\hspace{\fill}


%Subtable 3
\begin{subtable}[]
\flushright
\begin{tabular}{|c|c|}
\hline
\rowcolor[HTML]{F54A19} 
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} OPTICAL}}                                                     \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{\begin{tabular}[c]{@{}c@{}}Angular resolution \\ at the center of \\ Field Of View (FOV)\end{tabular}} & 0.82 mrad/pixel \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Focal Length}            & 14.67 mm         \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{f/number}                & 12               \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Entrance pupil diameter} & 1.25 mm          \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{FOV}                     & 45° x 45°        \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Diagonal FOV}            & 67°              \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Depth of field}          & 0.5 m – infinity \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Best focus}              & 1.0 m            \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Spectral range}          & 400 – 1100 nm    \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{\begin{tabular}[c]{@{}c@{}}Height above Martian \\ surface\end{tabular}}                               & $\sim$1500 m    \\ \hline
\end{tabular}
\end{subtable}

\caption{MER Descent camera technical data}
    % \label{tab:temps}
\end{table} 
1
  • Does each subtable need its own subcaption? If not, you could use two minipages instead of the subtable environments.
    – leandriis
    Sep 7, 2020 at 16:52

2 Answers 2

1

enter image description here Instead subtables are used tabularx nested in table*. For coloring rows is employed \rowcolors{1}{white}{red!30} defined in xtabular package:

\documentclass{article}
\usepackage{geometry}
\usepackage[table]{xcolor}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\usepackage{siunitx}

\begin{document}
    \begin{table}
    \sisetup{product-units=single}
    \renewcommand\tabularxcolumn[1]{m{#1}}
    \renewcommand\arraystretch{1.2}
\begin{tabular*}{\textwidth}{|*{2}{p{\dimexpr0.5\linewidth-2\tabcolsep-\arrayrulewidth}|}}
\hline
%Subtable 1
\rowcolors{1}{white}{red!10}
\begin{tabularx}{\linewidth}[t]{|>{\bfseries\hsize=0.9\hsize}C|
                              >{\hsize=1.1\hsize}C|}
    \hline
    \rowcolor[HTML]{F54A19}
\multicolumn{2}{|c|}{\textcolor{white}{\textbf{GENERAL}}}    \\ 
    \hline
Mass        &   207 grams                                   \\ 
    \hline
Dimensions  &   \SI{67 x 69 x 34}{mm}\newline
                (electronics)\newline 
                \SI{41 x 51 x 15}{mm}\newline
                (detector head)                             \\ 
    \hline
Power       & 2.15 Watts                                    \\
    \hline
    \end{tabularx}

\medskip
%Subtable 2
\rowcolors{1}{white}{red!10}
    \begin{tabularx}{\linewidth}{|>{\bfseries}C|C|}
    \hline
    \rowcolor[HTML]{F54A19}
\multicolumn{2}{|c|}{\textcolor{white}{\textbf{DETECTOR}}}  \\ 
    \hline
%    \rowcolor[HTML]{FDDCD3}
CCD full well       & 170000 electrons                      \\ 
    \hline
CCD readout noise,
\SI{55}{\celsius}   & \textless 3  electrons                \\ 
    \hline
%    \rowcolor[HTML]{FDDCD3}
CCD Gain, \SI{55}{\celsius}
                    & 98   electrons/DN                     \\ 
    \hline
ADC digitization  
12 bits/pixel       & 12 bits/pixel                         \\ 
    \hline
Frame transfer time & \SI{5.12}{ms}                         \\ 
    \hline
CCD readout time, 
full-frame mode     & \SI{5.4}{s}                           \\ 
    \hline
CCD readout time,
$4\times 1$ binned  & \SI{1.4}{s}                           \\ 
    \hline
Pixel  size         & \SI{12 x 12}{\micro\meter}            \\ 
    \hline
Fill factor         & \SI{100}{\%}                          \\ 
    \hline
SNR                 & \textgreater 200:1                    \\ 
    \hline
Exposure time       & $-\SI{335.5}{s}$, 
                      in steps of \SI{5.12}{ms}             \\ 
    \hline
    \end{tabularx} 
\smallskip 
    &
%Subtable 3
\rowcolors{1}{white}{red!10}
    \begin{tabularx}{\linewidth}[t]{|>{\bfseries\hsize=1.2\hsize}C|
                                     >{\hsize=0.8\hsize}C|}
    \hline
    \rowcolor[HTML]{F54A19}
\multicolumn{2}{|c|}{\textcolor{white}{OPTICAL}}    \\
    \hline
\rowcolor[HTML]{FDDCD3}
Angular resolution
at the center of
Field Of View (FOV) & \SI{0.82}{mrad/pixel}   \\
    \hline
Focal Length        & \SI{14.67}{mm}                \\
    \hline
f/number            & 12                            \\
    \hline
Entrance pupil diameter
                    & \SI{1.25}{mm}                 \\
    \hline
FOV                 & \SI[product-units=repeat]{45 x 45}{\degree} \\
    \hline
Diagonal FOV        & \SI{67}{\degree}              \\
    \hline
Depth of field      & \SI{0.5}{m} – infinity        \\
    \hline
Best focus          & \SI{1.0}{m}                   \\
    \hline
Spectral range      & \SI{400}{1100}{nm}            \\
    \hline
Height above
Martian surface     & $\sim$\SI{1500}{m}            \\
    \hline
    \end{tabularx} \\
\hline
\end{tabular*}  

\caption{MER Descent camera technical data}
    % \label{tab:temps}
\end{table} 
\end{document}
2

A few tricks.

An overall two column tabular for obtaining the center line. Each column has a tabular for stacking the two inner tables on the left and also the single one on the right, with a trick for top alignment.

The whole thing in a zero width box, because it overflows the text size. It might not be needed in your case, depending on your settings.

\documentclass[a4paper]{article}
\usepackage[table]{xcolor}
\usepackage{multirow}

\begin{document}

\begin{table}
\centering

\makebox[0pt]{%
\begin{tabular}{@{}c|c@{}} % for the center line

\begin{tabular}[t]{@{}c@{}}
\\[-\normalbaselineskip]

\begin{tabular}[b]{|c|c|}
\hline
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} \textbf{GENERAL}}}    \\ \hline
\textbf{Mass}  & \cellcolor[HTML]{FDDCD3}207 grams                                       \\ \hline
\multirow{3}{*}{\textbf{Dimensions}} & \begin{tabular}[c]{@{}c@{}}67 x 69 x 34 mm\\ (electronics)\end{tabular} \\ \cline{2-2} 
 & \cellcolor[HTML]{FDDCD3}\begin{tabular}[c]{@{}c@{}}41 x 51 x   15 mm\\ (detector head)\end{tabular} \\ \hline
\textbf{Power} & 2.15 Watts                                                              \\ \hline
\end{tabular}

\\[2ex]

\begin{tabular}[t]{|c|c|}
\hline
\rowcolor[HTML]{F54A19} 
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} \textbf{DETECTOR}}}                           \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{CCD full well}                                                                 & 170000 electrons        \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout noise, \\ 55 °C\end{tabular}} & \textless { 37} electrons  \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{CCD Gain, 55 °C}                                                               & 98   electrons/DN       \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}ADC digitization \\ 12 bits/pixel\end{tabular}} & 12 bits/pixel                                                              \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Frame transfer time}                                                           & 5.12 ms                 \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout time,\\ full-frame mode\end{tabular}}   & 5.4   s                 \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{\begin{tabular}[c]{@{}c@{}}CCD readout time,\\ 4 x 1 binned mode\end{tabular}} & 1.4 s                   \\ \hline
\textbf{Pixel  size}                                                                   & 12 x12 microns          \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Fill factor}                                                                   & 100\%                   \\ \hline
\textbf{SNR}                                                                           & \textgreater{ 200:1 }    \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Exposure time}                                                             & \begin{tabular}[c]{@{}c@{}}0 –335.5 s, \\ in steps of 5.12 ms\end{tabular} \\ \hline
\end{tabular}

\end{tabular}
&
\begin{tabular}[t]{@{}c@{}}
\\[-\normalbaselineskip]

\begin{tabular}{|c|c|}
\hline
\rowcolor[HTML]{F54A19} 
\multicolumn{2}{|c|}{\cellcolor[HTML]{F54A19}{\color[HTML]{FFFFFF} OPTICAL}}                                                     \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{\begin{tabular}[c]{@{}c@{}}Angular resolution \\ at the center of \\ Field Of View (FOV)\end{tabular}} & 0.82 mrad/pixel \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Focal Length}            & 14.67 mm         \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{f/number}                & 12               \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Entrance pupil diameter} & 1.25 mm          \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{FOV}                     & 45° x 45°        \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Diagonal FOV}            & 67°              \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Depth of field}          & 0.5 m – infinity \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{Best focus}              & 1.0 m            \\ \hline
\rowcolor[HTML]{FDDCD3} 
\textbf{Spectral range}          & 400 – 1100 nm    \\ \hline
\rowcolor[HTML]{FFFFFF} 
\textbf{\begin{tabular}[c]{@{}c@{}}Height above Martian \\ surface\end{tabular}}                               & $\sim$1500 m    \\ \hline
\end{tabular}

\end{tabular}
\end{tabular}}

\caption{MER Descent camera technical data}
    % \label{tab:temps}
\end{table}

\end{document}

enter image description here

You must log in to answer this question.

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