TransWikia.com

Beamer - split frame into two columns and adjust itemize environment

TeX - LaTeX Asked by rbaleksandar on December 11, 2020

I am experimenting with two-column layout for beamer slides. Currently I have the following slide:

begin{frame}{Comparison}
    pause
    begin{minipage}[t]{0.48linewidth}
        Pros:
        begin{itemize}[<+->]
            pause
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
    hfill
    begin{minipage}[t]{0.48linewidth}
        Cons:
        begin{itemize}[<+->]
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
end{frame}

This gives me the following results:

  1. Initial slide
    enter image description here
  2. Only the "title" of the first column appears
    enter image description here
  3. First bullet point in first column and the "title" of the second column appear simultaniously
    enter image description here
  4. Later on all bullet points in first column are visible
    enter image description here
  5. Starting with the bullet points in the second column
    enter image description here
  6. The end…
    enter image description here

This behaviour looks bad so I was hoping someone here can give me a hand to try different ways of organizing this slide:

  • Version 1 – both "titles" appear simultaniously but first the list in the first column expands and then the one in the second
  • Version 2 – second column ("title" + bullet points) appears (not simultaneously of course) after all bullet points in first column are visible
  • Version 3 – both "titles" appear simultaneously and both lists expand gradually in sync (1 bullet point in Pros and 1 bullet point in Cons appear at the same time). This is very useful if both lists have the same number of items. This allows comparing items between the two lists if they are connected somehow

Any idea how to do that?

2 Answers

If you want to have fine control, specify the frames explicitly instead of using pause and <+-> (see version 3 below).

Version 1:

documentclass{beamer}
begin{document}
begin{frame}{Comparison}
pause
    begin{minipage}[t]{0.48linewidth}
onslide<2->%
        Pros:
pause
        begin{itemize}[<+->]
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
    hfill
    begin{minipage}[t]{0.48linewidth}%
onslide<2->%
        Cons:
        begin{itemize}[<+->]
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
end{frame}
end{document}

Version 2:

documentclass{beamer}
begin{document}
begin{frame}{Comparison}
pause
    begin{minipage}[t]{0.48linewidth}
        Pros:
pause
        begin{itemize}[<+->]
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
    hfill
    begin{minipage}[t]{0.48linewidth}%
onslide<6->%
        Cons:
pause
        begin{itemize}[<+->]
            item 1
            item 2
            item 3
        end{itemize}
    end{minipage}
end{frame}
end{document}

Version 3:

documentclass{beamer}
begin{document}
begin{frame}{Comparison}
pause
    begin{minipage}[t]{0.48linewidth}
        Pros:
        begin{itemize}
            item<3-> 1
            item<4-> 2
            item<5-> 3
        end{itemize}
    end{minipage}
    hfill
    begin{minipage}[t]{0.48linewidth}%
        Cons:
        begin{itemize}
            item<3-> 1
            item<4-> 2
            item<5-> 3
        end{itemize}
    end{minipage}
end{frame}
end{document}

Correct answer by gernot on December 11, 2020

See, if the following solution gives what you looking for:

documentclass{beamer}

begin{document}
begin{frame}{Comparison}
    begin{columns}[t]
begin{column}{0.48linewidth}
        Pros:
        begin{itemize}
            item<1-> 1
            item<2-> 2
            item<3-> 3
        end{itemize}
    end{column}
    begin{column}{0.48linewidth}
        Cons:
        begin{itemize}
            item<1-> 1
            item<2-> 2
            item<3-> 3
        end{itemize}
end{column}
    end{columns}    
end{frame}
end{document}

enter image description here

Answered by Zarko on December 11, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP