0

I found example for row only here: Annotate the table row highlighted by Tikzmark in Beamer

Also found example for column only here: Annotate the table column highlighted by Tikzmark in Beamer

but never found an example to highlight row and column simultaneously in one table with different color.

PenKoNN
  • 41

1 Answers1

1

As in Annotate the table column highlighted by Tikzmark in Beamer, but with a new marker for the row.

In this case it's better not to draw borders.

\documentclass{beamer}

\usetheme{CambridgeUS} 
\usecolortheme{beaver}

% The usual suspects
\usepackage{booktabs} % Tables
% The table highlighting for hypothesis discussion.
\usepackage[beamer,customcolors]{hf-tikz}
\usetikzlibrary{calc}

\hfsetbordercolor{none}

\begin{document}


\begin{frame}
\frametitle{Table highlighted by columns}

\[
\begin{array}{ccc}
\toprule
A & B & C \\
\midrule

1 &\tikzmarkin<2>{col}2 & 3 \\
\tikzmarkin<2>{row}4 & 5 & 6\tikzmarkend{row} \\
7 & 8\tikzmarkend{col} & 9 \\
\bottomrule
\end{array}% 
\]
\end{frame}

\end{document}

enter image description here

Ignasi
  • 136,588