1

I am trying to position a figure on a page using textpos and then have a block appear over it in the next slide. I am inspired by the Gonzalo Medina's code given here. Here is what my code looks like, but the figure that is positioned on the page using textpos covers over the block as seen below -- block should cover that portion of the figure. Any suggestions?

\documentclass{beamer}
\usetheme{Madrid}

\usepackage[absolute,overlay]{textpos}

\begin{document}

\begin{frame}{III. Override pages}
    \begin{enumerate}
      \item Bookmark manager
      \item History
      \item New tab
  \end{enumerate}
  \begin{textblock*}{20mm}(50mm,30mm)%
    \rule{2cm}{4cm}
  \end{textblock*}

  \only<2->{
    \centering
    \begin{block}{Block Title}
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
     \end{block}
   }
\end{frame}

\end{document}

Page 1 Page 2

1

I think in this case it's better to use TikZ and not textpos (more information in Christian's answer to How can I position an image in an arbitrary position in beamer?)

textpos manual explains that overlay option places the contents over anything else, so it's not possible to draw something over the rule later on because the rule is on top of each slide.

Next code using TikZ remember picture and overlay options worked for me in this particular case.

\documentclass{beamer}
\usetheme{Madrid}

\usepackage{tikz}

\begin{document}

\begin{frame}{III. Override pages}
    \begin{enumerate}
      \item Bookmark manager
      \item History
      \item New tab
  \end{enumerate}

  \tikz[remember picture, overlay]\node at (current page.center) {\rule{2cm}{4cm}};

  \only<2->{
    \centering
    \begin{block}{Block Title}
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
     \end{block}
   }
\end{frame}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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