1

I want to animate a table as shown in the attached image. First I want the entries of first row to be in normal (without bold). Then at the next click, I want the selected entries to get bold. Then with the next click, next row should appear initially without bold entries. Then at the next click, I want the selected entries to get bold. This way all the rows should appear one by one. The entries of the previous rows which turned should remain bold till the time all the entries in the table have appeared. The final table should appear as per the attached image.enter image description here

I have attached the code of the frame below:

\begin{frame}{Scheduling example \dots}
    \begin{itemize}[<alert@+|+->]
        \justifying 
        \small
        \item[] \begin{table}
            \begin{tabular}{ c | c | c | c | c | c | c | c }
                \toprule
                & Sunday & Monday & Tuesday & Wednesday & Thursday & Friday & Saturday  \\
                \midrule
                RN1 & 3 & 4  & \bf 2&  \bf 2& \bf 2 & 6 & 4 \pause \\ 
                RN2 & 2 & \bf 3  &\bf 2 & \bf 2 & 3 & 5 & 3 \pause \\ 
                RN3 & 1 & 3  &\bf 2&\bf 2 & \bf 2 & 4 & 2 \pause \\ 
                RN4 &\bf 0& \bf 2  & 2 & 2 & 2 & 3 & \bf 1 \pause \\ 
                RN5 & - &  2 &  \bf 1 &  \bf 1  &  \bf 1   & 2 & 1 \pause \\ 
                RN6 &  \bf - & 1  & 1 & 1 & 1 &  \bf 1  &  \bf 0 \pause \\ 
                RN7 & - & 0  & \bf 0 &  \bf 0 & \bf 0 & 1 & - \pause \\ 
                %RN8 &  &   &  &  &  & 1 &  \pause \\ 
                \midrule
                Capacity& 5 & 5  & 2 & 2 & 3 & 7 & 5  \\ 
                \bottomrule
            \end{tabular}
        \end{table}
    \end{itemize}   
\end{frame}
mathslove
  • 141

1 Answers1

2

You can get what you desire with two \pause at every row and some \textbf<...->{...}.

I have also adjusted the gap in the vertical lines as suggested in this answer: https://tex.stackexchange.com/a/220172/101651.

\documentclass{beamer}
\usepackage{array}
\begin{document}
\begin{frame}{Scheduling example \dots}\scriptsize\centering\setlength{\tabcolsep}{4pt}\renewcommand{\arraystretch}{1.3}
\begin{tabular}{c | c | c | c | c | c | c | c}
    \noalign{\hrule height 1.5pt}
    & Sunday & Monday & Tuesday & Wednesday & Thursday & Friday & Saturday  \\
    \hline
    RN1 & 3 & 4  & \textbf<2->{2}&  \textbf<2->{2}& \textbf<2->{2} & 6 & 4 \pause\pause \\ 
    RN2 & 2 & \textbf<4->{3}  &\textbf<4->{2} & \textbf<4->{2} & 3 & 5 & 3 \pause\pause \\ 
    RN3 & 1 & 3  &\textbf<6->{2}&\textbf<6->{2} & \textbf<6->{2} & 4 & 2 \pause\pause \\ 
    RN4 &\textbf<8->{0}& \textbf<8->{2}  & 2 & 2 & 2 & 3 & \textbf<8->{1} \pause\pause \\ 
    RN5 & - &  2 &  \textbf<10->{1} &  \textbf<10->{1}  &  \textbf<10->{1} & 2 & 1 \pause\pause \\ 
    RN6 &  \textbf<12->{-} & 1  & 1 & 1 & 1 &  \textbf<12->{1}  &  \textbf<12->{0} \pause\pause \\ 
    RN7 & - & 0  & \textbf<14->{0} &  \textbf<14->{0} & \textbf<14->{0} & 1 & - \pause\pause \\ 
    %RN8 &  &   &  &  &  & 1 &  \pause\pause \\ 
    \hline
    Capacity& 5 & 5  & 2 & 2 & 3 & 7 & 5  \\ 
    \noalign{\hrule height 1.5pt}
\end{tabular}
\end{frame}
\end{document}

enter image description here enter image description here enter image description here enter image description here

CarLaTeX
  • 62,716