0

I meet the following question when using Beamer:

Example1:

1st page

A

2nd page

B
C

3rd page

D
C

E

4th page

D

F
E

And I require in every page the 1st, 2nd, 3rd, 4th lines are in the same position respectively.(e.g. A in page1 and B in page2 in the same position) How to realize such effect? Thank you for your help.

A,B,C,D,E,F are some equations or texts. If I only use \only, I find that page1's A will in the center of page2's BC.


Example2: page1

A

H

page2

C

page3

D
B

page4

E
F

I've figured out the 2nd example:

\begin{frame}
\only<1>{A}
\only<2>{C}
\only<3>{D}
\only<4>{E}

\onslide<3,4>{\alt<3>{B}{F}}

\only<1>{H}

\end{frame}

1 Answer 1

2

Use \visible or \invlisible to hide content while keeping the spacing.

\documentclass{beamer}

\begin{document}

    \begin{frame}

        \visible<1>{A}

        \visible<2->{\alt<2>{B}{D}}

        \visible<2,3>{C}

        \visible<4>{F}

        \visible<3->{E}

    \end{frame}

\end{document}

See also section 9.3 in the beamer class documentation.

1
  • Thank you. I update a example2, I try to use your method \alt to tackle the replacement of 2nd line(i.e. B,F), but I find it has one more blank line.
    – maplemaple
    Feb 27, 2019 at 21:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .