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 have a strange problem centering an image in a column.

I m going to create a presentation with Beamer and I created a slide with 2 columns.

The idea (conceptually) is to display the first image, then the second and then comes the last one which should replace the first 2 BUT be vertically centered I don t know how, but my last image goes at the bottom of the slide.

Here is the code:

\documentclass{beamer}
\usepackage[utf8x]{inputenc}
\usepackage{default}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{graphicx}
\usepackage{xmpmulti}
\graphicspath{{bilder_pre/}}
\usetheme{Warsaw}
\setbeamercovered{transparent}
\setbeamertemplate{items}[ball]
\begin{document}
\begin{frame}{TEXT - \textsl{TEXT TEXT TEXT}}

 \begin{block}{Auswirkung der dcckbcskjcbsc}
      Kommentar
 \end{block}

 \begin{columns}
      \begin{column}{0.33\textwidth}

                \visible<1-2>{\includegraphics[scale=0.2]{foto1}}
                \visible<2>{\includegraphics[scale=0.2]{foto2}}%
                \llap{\includegraphics<3->[scale=0.2]{foto3}}

      \end{column}

      \begin{column}{0.33\textwidth}
%                   \includegraphics<1->[scale=0.2]{Abbildung4_2}
      \end{column}

      \begin{column}{0.33\textwidth}
 %                   \includegraphics<1>[scale=0.2]{Abbildung4_1}
      \end{column}
 \end{columns}

\end{frame}


\end{document}

I tried every combination: \centering{}, \parbox, \begin{overlayarea} and \begin{overprint}. No matter...

What could I do?

enter image description here

enter image description here

share|improve this question
1  
@PeterJansson Make sure you are not overwriting an already posted edit during your edits. –  percusse Jan 11 '13 at 22:43
    
can't test it but you probably want a \leavevmode before that \llap –  David Carlisle Jan 11 '13 at 22:59
    
I think you need a formal welcome so Welcome to TeX.sx! –  hpesoj626 Jan 12 '13 at 4:36
add comment

1 Answer 1

up vote 1 down vote accepted

Here you are a solution with \parbox and \only:

\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}
\usepackage{graphicx}
\usepackage{framed}
\usetheme{Warsaw}

\begin{document}
\begin{frame}{TEXT - \textsl{TEXT TEXT TEXT}}
\begin{block}{Auswirkung der dcckbcskjcbsc}
Kommentar
\end{block}

\begin{columns}
\begin{column}{0.33\textwidth}

%better than scale: width + height + keepaspectratio

\parbox[c][.6\textheight][c]{\columnwidth}{%
\only<1-2>{\includegraphics[width=\columnwidth,%
    height=.3\textheight,keepaspectratio]{foto1}\\%
\visible<2>{\includegraphics[width=\columnwidth,%
    height=.3\textheight,keepaspectratio]{foto2}}%
}
\only<3>{\includegraphics[width=\columnwidth,%
    height=.3\textheight,keepaspectratio]{foto3}%
}}

\end{column}
\begin{column}{0.33\textwidth}
\end{column}
\begin{column}{0.33\textwidth}
\end{column}
\end{columns}
\end{frame}
\end{document}

MWE

share|improve this answer
add comment

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.