Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to include two following pictures side-by-side into beamer:

enter image description hereenter image description here

but usually the second is placed lower than the first one. It depends on their sizes:

  • if I want them to be of a similarly size then their horizontal axes are not the same.

  • if I make their horizontal axes to be the same, then the second picture has to bigger than the first one.

I have used \includegraphics, \subfigure, \mbox and similar commands, but it somehow does not have any effect.

I have tried also this: Move a figure a bit right

Maybe the reason is that the pictures have different resolutions?

Thanks for advice.

Edit: The first image may cause the problems: opening it in "Eye of GNOME 2.30.0" one gets this view: enter image description here

share|improve this question
    
Have you tried to use \includegraphics inside a tabular environement? EDIT: What about this: \begin{frame} \frametitle{Title} \begin{minipage}[c]{\textwidth} \begin{minipage}[c]{0.49\textwidth} \begin{center} \includegraphics[width=\textwidth]{fig1}\\ Caption1 \end{center} \end{minipage} \begin{minipage}[c]{0.49\textwidth} \begin{center} \includegraphics[width=\textwidth]{fig2}\\ Caption 2 \end{center} \end{minipage} \end{minipage} \end{frame} –  miladydesummer Sep 20 '12 at 13:42
    
Yes, and the problem is still the same:( –  Miroslav Korbelar Sep 20 '12 at 14:22
    
The standard answer should be to say \raisebox{-.5\height}{\includegraphics[...]{...}}; the adjustbox package provides more tools. –  egreg Sep 20 '12 at 15:32
    
@egreg Thank you, this works well. It is the simplest solution. –  Miroslav Korbelar Sep 27 '12 at 10:54

2 Answers 2

up vote 2 down vote accepted

A (maybe too) simplistic solution is to say

\raisebox{-.5\height}{\includegraphics[...]{...}}

The package adjustbox provides many other tools.

share|improve this answer

There are of course several approaches here. I'd use xcoffins

\documentclass{beamer}
\usepackage{xcoffins}
\NewCoffin{\CoffinA}
\NewCoffin{\CoffinB}
\begin{document}
\begin{frame}
  \SetHorizontalCoffin{\CoffinA}{\includegraphics[scale = 0.4]{iDd8t}}%
  \SetHorizontalCoffin{\CoffinB}{\includegraphics[scale = 0.5]{WtVfE}}%
  \JoinCoffins{\CoffinA}[vc,r]{\CoffinB}[vc,l]%
  \TypesetCoffin{\CoffinA}
\end{frame}
\end{document}

which yields

enter image description here

If you want to do a manual shift, you just need to use a line of the form

\JoinCoffins{\CoffinA}[vc,r]{\CoffinB}[vc,l](0 pt, 0pt)

where the two dimensions are the horizontal and vertical shift of the second image, respectively.

share|improve this answer
    
I've used the images as-uploaded, by the way. –  Joseph Wright Sep 20 '12 at 15:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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