Graphics, Figures & TablesImages in same Line on Presentation Frame

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
astrak
Posts: 10
Joined: Mon Oct 29, 2012 8:00 pm

Images in same Line on Presentation Frame

Post by astrak »

Hello!

I use the beamer class with Frankfurt theme and I have problems with aligning images. Is there any way how to align two images in the same line with \caption under pictures? One could be on the left and the other one on the right. But it doesn't matter.

Thank you very much in advance!
Last edited by astrak on Tue Mar 26, 2013 11:41 pm, edited 1 time in total.

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Images in same Line on Presentation Frame

Post by localghost »

Two {minipage} environments should help here with the alignment for the images. If that doesn't help, please provide a self-contained and minimal example to give an adequate problem description.


Thorsten
astrak
Posts: 10
Joined: Mon Oct 29, 2012 8:00 pm

Images in same Line on Presentation Frame

Post by astrak »

Thank you localghost for your suggestion with {minipage}! It helped me very much. If someone else will have the same problem, my code is bellow.

Code: Select all

\begin{figure}[!htb]
  \begin{minipage}[b]{0.45\linewidth}
    \centering
    \includegraphics[width=3cm,height=3cm]{firstpicture}
    \caption{text}
    \label{fig:label-1}
  \end{minipage}
  \hfill
  \begin{minipage}[b]{0.45\linewidth}
    \centering
    \includegraphics[width=3cm,height=3cm]{secondpicture}
    \caption{text}
    \label{fig:label-2}
  \end{minipage}
\end{figure}
Post Reply