1

This question already has an answer here:

I have a table and figure that I need them to appear side-by-side. The figure appears in a higher position than the table. I need to align them so that their sizes are equivalent. This is the script and the output compared to what I need.

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{graphicx}
\begin{document}
\begin{minipage}{\textwidth}
\begin{minipage}[b]{0.49\textwidth}
\centering 
\captionof{table}{Table}
\begin{tabular}{ll}
\hline\noalign{\smallskip}
Item1 & Item2 \\
\noalign{\smallskip}
\hline
\noalign{\smallskip}
C & 100  \\
B & 200  \\
C & 300 \\
\hline
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[b]{0.49\textwidth}
\centering
\includegraphics[width=0.5\textwidth]{venndiagram2}
\captionof{figure}{Diagram.}
\end{minipage}
\end{minipage}
\end{document}

enter image description here

marked as duplicate by Stefan Pinnow, Masroor, CarLaTeX, Jesse, Werner floats Mar 31 '17 at 5:50

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

enter image description here

  • outer minipage is surplus
  • both inner mipages pages have proper position options [b]
  • to table you need add position option [b]
  • with booktabs you can obtain simpler code for horizontal lines in table

MWE:

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[demo]{graphicx}
\usepackage{booktabs}

\begin{document}
    \begin{minipage}[b]{0.49\textwidth}
    \centering
\captionof{table}{Table}
\begin{tabular}[b]{ll}
    \toprule    %[0.3pt] 
Item1 & Item2 \\
    \midrule    %[0.3pt]
\noalign{\smallskip}
C & 100  \\
B & 200  \\
C & 300 \\
    \bottomrule %[0.3pt]
\end{tabular}
\end{minipage}
\hfill
\begin{minipage}[b]{0.49\textwidth}
    \centering
\includegraphics[width=0.5\textwidth]{venndiagram2}
\captionof{figure}{Diagram.}
    \end{minipage}
\end{document}

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