Transparent table captions when using onslide with overprint and setbeamercovered{invisible}

1,606

The behaviour of \onslide is different depending on whether it's used inside an overprint environment or on its own. Outside, you must use braces to delimitate the argument of your \onslide command. That seems to fix it:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{Reduced Resource Requirements}
\begin{columns}
  \begin{column}[c]{0.5\textwidth}
  \setbeamercovered{transparent}
    \hspace{-2em}
    \begin{itemize}
    \onslide<1>{\item $95\%$ decrease disk footprint}
    \onslide<2>{\item $86\%$ decrease memory footprint}
    \onslide<3>{\item $62\%$ decrease in runtime}
    \end{itemize}
  \end{column}

  \begin{column}[c]{0.5\textwidth}
  \setbeamercovered{invisible}
    \begin{overprint}

      \onslide<1>
        \begin{table}
          \centering
          \caption{On Disk Requirement}
          \begin{tabular}{r|l}
            AST & Source code         \\
                & \& build toolchain  \\
            ASM & Assembly code       \\
                & assembler \& linker \\
            ELF & Compiled executable \\
          \end{tabular}
        \end{table}

      \onslide<2>
        \begin{table}
          \centering
          \caption{Memory(MB) Requirements}
          \begin{tabular}{r|l}
            AST & 1402 \\
            ASM & 756  \\
            ELF & 200  \\
          \end{tabular}
        \end{table}

      \onslide<3>
        \begin{table}
          \centering
          \caption{Runtime (Sec)}
          \begin{tabular}{r|l}
            AST & 229.50 \\
            ASM & 278.30 \\
            ELF & 74.20  \\
          \end{tabular}
        \end{table}

    \end{overprint}
  \end{column}

\end{columns}
\end{frame}

\end{document}

In your case, you don't even need to use \onslide if you take advantage of the overlay awareness of \item:

\documentclass{beamer}

\begin{document}

\begin{frame}
\frametitle{Reduced Resource Requirements}
\begin{columns}
  \begin{column}[c]{0.5\textwidth}
  \setbeamercovered{transparent}
    \hspace{-2em}
    \begin{itemize}
    \item<1> $95\%$ decrease disk footprint
    \item<2> $86\%$ decrease memory footprint
    \item<3> $62\%$ decrease in runtime
    \end{itemize}
  \end{column}

  \begin{column}[c]{0.5\textwidth}
  \setbeamercovered{invisible}
    \begin{overprint}

      \onslide<1>
        \begin{table}
          \centering
          \caption{On Disk Requirement}
          \begin{tabular}{r|l}
            AST & Source code         \\
                & \& build toolchain  \\
            ASM & Assembly code       \\
                & assembler \& linker \\
            ELF & Compiled executable \\
          \end{tabular}
        \end{table}

      \onslide<2>
        \begin{table}
          \centering
          \caption{Memory(MB) Requirements}
          \begin{tabular}{r|l}
            AST & 1402 \\
            ASM & 756  \\
            ELF & 200  \\
          \end{tabular}
        \end{table}

      \onslide<3>
        \begin{table}
          \centering
          \caption{Runtime (Sec)}
          \begin{tabular}{r|l}
            AST & 229.50 \\
            ASM & 278.30 \\
            ELF & 74.20  \\
          \end{tabular}
        \end{table}

    \end{overprint}
  \end{column}

\end{columns}
\end{frame}

\end{document}
Share:
1,606

Related videos on Youtube

eschulte
Author by

eschulte

Updated on July 16, 2020

Comments

  • eschulte
    eschulte over 3 years

    The following works correctly in that the right table is shown at the right time, and all alignment works as expected. The only issue is that while the table body is shown as normal, the table captions are shaded as if by \setbeamercovered{transparent}.

    \begin{frame}
    \frametitle{Reduced Resource Requirements}
    \begin{columns}
      \begin{column}[c]{0.5\textwidth}
      \setbeamercovered{transparent}
        \hspace{-2em}
        \begin{itemize}
        \onslide<1>\item $95\%$ decrease disk footprint
        \onslide<2>\item $86\%$ decrease memory footprint
        \onslide<3>\item $62\%$ decrease in runtime
        \end{itemize}
      \end{column}
    
      \begin{column}[c]{0.5\textwidth}
      \setbeamercovered{invisible}
        \begin{overprint}
    
          \onslide<1>
            \begin{table}
              \centering
              \caption{On Disk Requirement}
              \begin{tabular}{r|l}
                AST & Source code         \\
                    & \& build toolchain  \\
                ASM & Assembly code       \\
                    & assembler \& linker \\
                ELF & Compiled executable \\
              \end{tabular}
            \end{table}
    
          \onslide<2>
            \begin{table}
              \centering
              \caption{Memory(MB) Requirements}
              \begin{tabular}{r|l}
                AST & 1402 \\
                ASM & 756  \\
                ELF & 200  \\
              \end{tabular}
            \end{table}
    
          \onslide<3>
            \begin{table}
              \centering
              \caption{Runtime (Sec)}
              \begin{tabular}{r|l}
                AST & 229.50 \\
                ASM & 278.30 \\
                ELF & 74.20  \\
              \end{tabular}
            \end{table}
    
        \end{overprint}
      \end{column}
    
    \end{columns}
    \end{frame}
    

    I tried wrapping each table in a block, but that lead to TeX stack overflow issues. Any ideas are much appreciated.

  • eschulte
    eschulte over 10 years
    This fixes it, thanks for the fix and the clear explanation of the behavior.