1

Good morning,

I would like to put the picture on the left of the table, all horizontally.

When I try this solution it doesn't work. What changes is the picture and table are aligned with left margin aligned vertically, with both captions remaining centered.

I can't seem to do it at all, can anyone help?

Thanks in advance.

The code is this:

\begin{figure}[H]
  \begin{center}
  \includegraphics[scale=0.50]{uniformity_machine.PNG}
  \caption{Uniformity machine}
  \label{fig:uniformitymachine}
  \end{center}
\end{figure}

{\centering \hfill
\begin{table}[h]
    \centering
    \begin{tabular}{| c | c |c | }
    \hline
    \small
    \textbf{Parameter} & \textbf{Value}  &  \textbf{Unit} \\
    \hline
    Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
    \hline
    Weight & 3 100 & kg\\
    \hline
    Rim diameter & 13 - 25 & in\\
    \hline
    \multirow{3}{*}{Electrical requirements} & 3 & Phase\\
    & 400 & V \\
    & 50 & Hz \\
    & 35 & A \\
    \hline
    Pneumatic requirements & 600 & kPa\\
    \hline
    Cycle time & 20 & s\\
     \hline
    Cost & NUMBER & EUR \\
    \hline
    \end{tabular}
    \caption{Uniformity machine specifications}\label{tab2}
\end{table}
\hfill}

This is what it looks like right now:

enter image description here

New contributor
Maria is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 2
    Welcome to TeX.SE. Which of the seven answers given in the link you provided did you try to implement? – Mico Jan 12 at 14:39
4

I doubt that your table and image will fit besides each other unless you either reduce the margin size or restructure the table layout.

\documentclass{article}

\usepackage{caption}
\usepackage{graphicx}
\usepackage{multirow}

\usepackage[hmargin=2cm]{geometry}

\begin{document}

\noindent%
\begin{minipage}{.45\textwidth}%
    \includegraphics[width=\textwidth]{example-image-duck}
  \captionof{figure}{Uniformity machine}
  \label{fig:uniformitymachine}
\end{minipage}%
\hfill
\begin{minipage}{.5\textwidth}
    \centering
   \begin{tabular}{| c | c | c | }
    \hline
    \textbf{Parameter} & \textbf{Value}  &  \textbf{Unit} \\
    \hline
    Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
    \hline
    Weight & 3 100 & kg\\
    \hline
    Rim diameter & 13 - 25 & in\\
    \hline
    \multirow{3}{*}{Electrical requirements} & 3 & Phase\\
    & 400 & V \\
    & 50 & Hz \\
    & 35 & A \\
    \hline
    Pneumatic requirements & 600 & kPa\\
    \hline
    Cycle time & 20 & s\\
     \hline
    Cost & NUMBER & EUR \\
    \hline
    \end{tabular}
    \captionof{table}{Uniformity machine specifications}
    \label{tab2}
\end{minipage}

\end{document}

enter image description here

  • it worked!!!! thank you so much! – Maria Jan 12 at 14:32
  • @Maria Good to hear that it worked! If you have some time, please have a look at betterposters.blogspot.com/2012/08/the-data-prison.html – samcarter Jan 12 at 14:38
  • 1
    @Maria If samcarter's answer solves your problem, you should mark it as accepted by clicking the tick in the answer. – JouleV Jan 12 at 14:57
2

You can use the floatrow environment:

\documentclass{book}
\usepackage{geometry}
\usepackage{subcaption, floatrow, multirow, graphicx}

\begin{document}

\begin{figure}[!ht]
\centering\CenterFloatBoxes
\floatsetup{floatrowsep = qquad}
\begin{floatrow}[2]
\ffigbox[\FBwidth]{\caption*{Konrad Klapheck: \emph{Les Liaisons Dangereuses} (1968)}}{\includegraphics[scale=0.35]{klapheck1}}
\killfloatstyle
\ttabbox{ \begin{tabular}{| c | c |c | }
    \hline
    \small
    \textbf{Parameter} & \textbf{Value} & \textbf{Unit} \\
    \hline
    Dimension (wxdxh) & 1 725x2 800x2 500 & mm \\
    \hline
    Weight & 3 100 & kg\\
    \hline
    Rim diameter & 13 - 25 & in\\
    \hline
    \multirow{3}{*}{Electrical requirements} & 3 & Phase\\
    & 400 & V \\
    & 50 & Hz \\
    & 35 & A \\
    \hline
    Pneumatic requirements & 600 & kPa\\
    \hline
    Cycle time & 20 & s\\
     \hline
    Cost & NUMBER & EUR \\
    \hline
    \end{tabular}}{ \caption{Uniformity machine specifications}\label{tab2}}
\end{floatrow}
\end{figure}

\end{document} 

enter image description here

Your Answer

Maria is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.