Graphics, Figures & TablesSide by side tables and graphics with captions

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
remcovink
Posts: 2
Joined: Sun Dec 21, 2014 8:45 pm

Side by side tables and graphics with captions

Post by remcovink »

Dear community,

Im trying to make the layout of my document such that on the left side of my page I have a graphic with caption and on the right side of the page next to the graphic I have a table

I tried a lot of things with minipages but with minipages I cant get captions to work.
And i tried using flushedleft and right but with this the caption also stayed in the middle of the page.

Does anyone know how to do this?

Thanks in advance
Remco

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Side by side tables and graphics with captions

Post by Stefan Kottwitz »

Hi Remco,

welcome to the forum!

minipages are a good way. They also have alignment options. Regarding the captions, you could use the caption package or even the subcaption package.

Maybe give them a try. Perhaps post the code you have tried then, so we could see where exactly help might be needed.

Stefan
LaTeX.org admin
remcovink
Posts: 2
Joined: Sun Dec 21, 2014 8:45 pm

Side by side tables and graphics with captions

Post by remcovink »

I am now using this

Code: Select all

 {\centering
\begin{minipage}{0.45\textwidth}
  \centering
  \graphicspath{ {./afbeeldingen/} }
  \includegraphics[width=0.9\textwidth]{fles5}
  \captionof{figure}{Fles 5}
\end{minipage}
\begin{minipage}{0.45\textwidth}
  \centering
  \begin{tabular}[l]{ | l | l | }
  \hline
  \textbf{Eigenschappen} & \textbf{Waardes}			  \\ \hline
   &  \\ \hline
   &  \\ \hline        
   &  \\ \hline  
  \end{tabular}
  \captionof{table}{Tabel Fles 5}
\end{minipage}
}		
which works quite well, only my images get turned 90 degrees for some reason, and I don't know why.
Post Reply