# How to make a picture and a table in the same page with the same height

I'm writing a document and implementing a picture of device and it's technical data in a table in the same page. The problem which I have is that the page and the table are not in the same level which causes that title of picture is not at the same height

This is the code:

\begin{minipage}{0.5\textwidth}
\begin{figure}[H]
\centering
\includegraphics[width=7cm, height=4cm]{gaszaehler}
\caption{Q-loud EnrgyCam 2.0}
\end{figure}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{table}[H]
\centering
\scalebox{0.9}{
\begin{tabular}{ | l | c|}
\hline
Stromversorgung  & DC 5 V  $\geq100$ mA   \\ \hline
Betriebstemperatur &  -10 °  -  50 °\\ \hline
Schutzklasse & IP64 \\ \hline
Bussystem & M-Bus \\ \hline
Dimensionen & 42 x 42 mm (T x H)  \\ \hline
Sensoreinheit & Kamera Modul \\ \hline
% &  &  &  \\  \hline
\end{tabular}
}
\caption{Technische Daten der Q-loud EnrgyCam 2.0 \cite{energycam_mbus} }
\end{table}
\end{minipage}


could someone help me please to make them both in the same hight?

• Have a look here. – marmot May 8 '18 at 17:47
• it doesn't fix my problem: \begin{tabular}[b]{cr}% – AhmyOhlin May 8 '18 at 18:03
• Sure, you need to read the question: use \savebox to measure the height of the table and use it to set the height of the graphics. – marmot May 8 '18 at 18:06

## 1 Answer

OK, too long for a comment.

\documentclass{article}
\usepackage{amsmath,siunitx,graphicx,floatrow}
% from https://tex.stackexchange.com/a/6869/121799
\newfloatcommand{capbtabbox}{table}[][\FBwidth]
\begin{document}
\newsavebox{\testbox}%
\newlength{\testheight}%
\savebox{\testbox}{% from https://tex.stackexchange.com/a/66429/121799
\begin{tabular}[b]{ | l | c|}
\hline
Stromversorgung  & DC \si{5\volt}  $\geq100\si{\milli\ampere}$   \\ \hline
Betriebstemperatur &  \si{-10\degree} ---  \si{50\degree} \\ \hline
Schutzklasse & IP64 \\ \hline
Bussystem & M-Bus \\ \hline
Dimensionen & 42 x 42 mm (T x H)  \\ \hline
Sensoreinheit & Kamera Modul \\ \hline
% &  &  &  \\  \hline
\end{tabular}
}%
\settoheight{\testheight}{\usebox{\testbox}}
\begin{figure}
\begin{floatrow}
\ffigbox{%
\includegraphics[height=\testheight]{example-image-a}%
}{%
\caption{Q-loud EnrgyCam 2.0}%
}
\capbtabbox{%
\usebox{\testbox}
}{%
\caption{Technische Daten der Q-loud EnrgyCam 2.0 \cite{energycam_mbus} }%
}
\end{floatrow}
\end{figure}
\end{document}


I also used the opportunity to use siunitx to typeset the units.