0

I want the red boxes in column 6 ( labeled F) to appear one by one. Also, after all the boxes get highlighted want the last column (labled G) to appear with cells appearing one by one. Currently the appearance is completely haphazard. All the boxes are appearing at the same time.

\documentclass[11pt, aspectratio=169]{beamer}
\usepackage{pgfpages}
\usepackage{helvet}
\usepackage[default]{lato}
\usepackage{array}
\usepackage{tikz}
\usepackage{multirow,makecell}
\usepackage{verbatim}
\usepackage[font=scriptsize]{caption}
\usetikzlibrary{positioning}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{matrix,shapes,arrows,fit,tikzmark}
\usepackage{amsmath}
\usepackage{mathpazo}
\usepackage{hyperref}
\usepackage{lipsum}
\usepackage{multimedia}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage[space]{grffile}
\usepackage{booktabs}
\usepackage{soul}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{bg}
\hfsetbordercolor{red}
\setbeamercolor{frametitle}{fg=red!80!black} %only for title

\begin{document}


\begin{frame}{Computing Slack Time \dots}
    \begin{table}
        \centering
        \resizebox{0.4\linewidth}{!}{
            \begin{tabular}{ c | c | c | c | c | c | >{\onslide<7->}c }
                \toprule
            A & B & C & D & E& F &G\\
                \midrule
                A &  $0$ & $2$&  $0$ & $2$  &  \tikzmarkin<2->{a}$0$\tikzmarkend{a} & \uncover<+->{Yes}\\
                \midrule
                B &  $0$ & $3$&  $1$ & $4$  &  \tikzmarkin<0>{b}$1$\tikzmarkend{b} & \uncover<+->{No} \\
                \midrule
                C &  $2$ & $4$&  $2$ & $4$  & \tikzmarkin<3->{c}$0$\tikzmarkend{c}& \uncover<+->{Yes} \\
                \midrule
                D & $3$ & $7$&  $4$ & $8$  &  \tikzmarkin<0>{d}$1$\tikzmarkend{d}& \uncover<+->{No} \\
                \midrule
                E &  $4$ & $8$&  $4$ & $8$  &  \tikzmarkin<4->{e}$0$\tikzmarkend{e} & \uncover<+->{Yes} \\
                \midrule
                F & $4$ & $7$&  $10$ & $13$  &  \tikzmarkin<0>{f}$6$\tikzmarkend{f} & \uncover<+->{No} \\
                \midrule
                G & $8$ & $13$&  $8$ & $13$  &  \tikzmarkin<5->{g}$0$\tikzmarkend{g} & \uncover<+->{Yes} \\
                \midrule
                H & $13$ & $15$&  $13$ & $15$  & \tikzmarkin<6->{h}$0$\tikzmarkend{h} & \uncover<+->{Yes} \\
                \bottomrule
            \end{tabular}
        }
        \caption*{Schedule and Slack Times}
    \end{table} 
\end{frame}
\end{document}
3
  • You should really clean up your preamble. A lot of these package are not needed in a beamer presentation. Commented Feb 25 at 12:00
  • Using vertical lines in a booktabs table is not a good idea, look at all the gaps this causes! Commented Feb 25 at 12:00
  • Thanks for all your inputs.
    – mathslove
    Commented Feb 25 at 16:50

1 Answer 1

1

I wouldn't use relative overlays here as your cells are not in the same order in the code as you want to uncover them.

\documentclass[11pt, aspectratio=169]{beamer}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usepackage{booktabs}
\usepackage[beamer,customcolors]{hf-tikz}
\hfsetfillcolor{bg}
\hfsetbordercolor{red}
\setbeamercolor{frametitle}{fg=red!80!black} %only for title

\begin{document}

\begin{frame}
    \frametitle{Computing Slack Time \dots}
    \begin{table}
        \centering
            \begin{tabular}{ c | c | c | c | c | c | c }
                \toprule
            A & B & C & D & E& F &\uncover<7->{G}\\
                \midrule
                A &  $0$ & $2$&  $0$ & $2$  &  \tikzmarkin<2->{a}$0$\tikzmarkend{a} & \uncover<7->{Yes}\\
                \midrule
                B &  $0$ & $3$&  $1$ & $4$  &  \tikzmarkin<0>{b}$1$\tikzmarkend{b} & \uncover<8->{No} \\
                \midrule
                C &  $2$ & $4$&  $2$ & $4$  & \tikzmarkin<3->{c}$0$\tikzmarkend{c}& \uncover<9->{Yes} \\
                \midrule
                D & $3$ & $7$&  $4$ & $8$  &  \tikzmarkin<0>{d}$1$\tikzmarkend{d}& \uncover<10->{No} \\
                \midrule
                E &  $4$ & $8$&  $4$ & $8$  &  \tikzmarkin<4->{e}$0$\tikzmarkend{e} & \uncover<11->{Yes} \\
                \midrule
                F & $4$ & $7$&  $10$ & $13$  &  \tikzmarkin<0>{f}$6$\tikzmarkend{f} & \uncover<12->{No} \\
                \midrule
                G & $8$ & $13$&  $8$ & $13$  &  \tikzmarkin<5->{g}$0$\tikzmarkend{g} & \uncover<13->{Yes} \\
                \midrule
                H & $13$ & $15$&  $13$ & $15$  & \tikzmarkin<6->{h}$0$\tikzmarkend{h} & \uncover<14->{Yes} \\
                \bottomrule
            \end{tabular}
        \caption{Schedule and Slack Times}
    \end{table} 
\end{frame}
\end{document}

enter image description here

You must log in to answer this question.

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