TransWikia.com

Overlay steps in two columns

TeX - LaTeX Asked on July 26, 2021

I have the following slide:

documentclass[beamer]{beamerswitch}
usetheme{metropolis}
beamerdefaultoverlayspecification{<+->}

begin{document}
begin{frame}frametitle{My title}

  begin{columns}[t]
    begin{column}{0.49textwidth}
      begin{block}{Left side}
        begin{itemize}
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}

    begin{column}{0.49textwidth}
      begin{block}{Right side}
        begin{itemize}
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}
  end{columns}
end{frame}
end{document}

When I compile it, I get 9 pages. On slides 1-2, only the title appears. “Left side” appears on slide 3, and “Right side” appears on slide 7.

What should I change so that “Left side” appears on slide 1 already and there are no extra steps on slide 2 and 6? I would like to keep the default overlay specification for the document.

EDIT: By trial and error, I found this solution:

documentclass[beamer]{beamerswitch}
usetheme{metropolis}
beamerdefaultoverlayspecification{<+->}

begin{document}
begin{frame}frametitle{My title}
beamerdefaultoverlayspecification{} %switch off for this slide

  begin{columns}[t]
    begin{column}{0.49textwidth}
      begin{block}{Left side}
        begin{itemize}[<+(1)->]
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}

    begin{column}{0.49textwidth}
      begin{block}{uncover<4->{Right side}}
        begin{itemize}[<+(2)->]
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}
  end{columns}
end{frame}
end{document}

I don’t understand why it does what it does. If beamerdefaultoverlayspecification{<+->} is in effect, beamer poses twice after printing the title. Why? It seems something is changing the value of the beamerpauses counter, but if I understand the manual correctly, neither the column nor the block environment is supposed to do that. So what’s injecting all these pauses?

2 Answers

Next try. [<+(1)->]

documentclass[beamer]{beamerswitch}
usetheme{metropolis}
%beamerdefaultoverlayspecification{<+->}

begin{document}
begin{frame}frametitle{My title}

  begin{columns}[t]
    begin{column}{0.49textwidth}
      begin{block}{Left side}
        begin{itemize}[<+(1)->]
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}

    begin{column}{0.49textwidth}
      begin{block}{Right side}
        begin{itemize}[<+(1)->]
        item First item;
        item Second item;
        end{itemize}
      end{block}
    end{column}
  end{columns}
end{frame}
end{document}

enter image description here

Answered by user121799 on July 26, 2021

Unfortunately I can not say anything to why this happens, but the following fixes the issue for me through patching the columns and column environments with etoolbox:

usepackage{etoolbox}
% when using columns we get two empty pages before itemize without this, 
% when using beamerdefaultoverlayspecification{<+->} 
pretocolumns{addtocounter{beamerpauses}{-1}}
pretocolumn{addtocounter{beamerpauses}{-1}}

After that no empty pages appear before the list, and the overlaying runs through both columns like expected.

Answered by Jaleks on July 26, 2021

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