1

I have the following table in beamer class

 \documentclass[svgnames]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}

\definecolor{MyBackground}{RGB}{255,253,218}
 %\definecolor{MyBackground}{RGB}{255,241,167}
\setbeamercolor{background canvas}{bg=MyBackground}

\usepackage{makecell}

\usepackage[para,flushleft]{threeparttable}

\usepackage{array,calc}

\usepackage{multicol}
\usepackage{booktabs}

\usepackage{setspace}


\begin{document}

\begin{frame}{Avignon Université, depuis 09/2016, 563 heures Eq. TD}

\begin{columns}
\column{13cm}

{\small
\vspace{-5pt}
\begin{table}[!htp]
\setlength\extrarowheight{1pt}
\def\arraystretch{1.1}
\centering
\begin{threeparttable}
\begin{tabular}{ |l|p{3,5cm}|p{1.5cm}|m{1.5cm}|  }
\hline
%\multicolumn{4}{|c|}{Outils mathématiques} \\
%\hline
{\bf Matière} & {\bf Public} & {\bf Type} & {\bf  Heures}\\
\Xhline{2\arrayrulewidth}
TP physique &  CMI, PC  (L1)  & TP & 180 \\
\hline
Thermodynamique&  PC, CMI, MP, C (L1)  & CM, TD   & 147,25\\
%Thermodynamique &  MP, PC, C, CMI (L1)  & CM   & 24,75 \\
Thermodynamique 2 &    C, CMI, P, PC (L2)  & CM, TD   & 41,25 \\
\hline
Mécanique continuum &  P (L3)  & CM, TD &24\\
 Mécanique du point& PC (L1)  &  TD & 12\\
Mécanique du solide&  P (L2)  & CM, TD & 3,75 \\
\hline
Analyse dimensionnelle& CMI, PC, MP (L1)  & TD &   33\\
De l'élec. à la méca. & PC (L1), SVT (L1) & TD & 24\\
Méthodologie &  M, MP, (L1)  & CM, TD &   15\\
Outils numériques 2 &  PC (L3)  & TD &   8\\
Machines thermiques& EE (L3pro) & CM, TD  & 56,25\\
%Machines thermiques & EE (L3pro)  & CM, TD  & 18,75 \\
Risques physiques&  MRTP (L3pro)  & CM, TD &14 \\
\hline
\end{tabular}
\end{threeparttable}
\end{table} 

}
\end{columns}
\end{frame}
\end{document}

enter image description here

How is possible to highlight with overlay the contents of the rows distinguised by the hline? I.e.

1) Highlight the first line

2) Un-highlight the first line and highlight the second and the third

3) and so on

If this is difficult it would suffice a rectangle that passes sequentially from the above mentioned lines.

EDIT Based on the comment I use the following code. However I cannot figure how can I have the following sequence of highlighting:

1) First line 2) second and third line 3) third to 6th line 4) the last four lines.

Any ideas?

\documentclass{beamer}

\usepackage{booktabs,colortbl}

\begin{document}

\begin{frame}
  \centering
  \begin{tabular}{ p{.455\linewidth} p{.455\linewidth} }%
  \toprule
  a & b \\
  \midrule
  \strut\\[-\normalbaselineskip]%
  \only<3-4>{\\[-\normalbaselineskip]\rowcolor{cyan!25}}A & B\only<1-2,5>{\\}%
  \only<3-4>{\\\rowcolor{cyan!25}}C & D\only<1,5>{\\}%
  \only<2-4>{\\\rowcolor{lime!25}}E & F\only<1,5>{\\}%
  \only<2-4>{\\\rowcolor{lime!25}}G & H\only<1>\\%
  \only<2-4>{\\\rowcolor{lime!25}}\only<5>{\\\rowcolor{red!35}}I & J\only<1-3,5>{\\}%
  \only<4-4>{\\\rowcolor{orange!25}}K & L\only<1-2,5>{\\}%
  \only<3-4>{\\\rowcolor{cyan!25}}M & N\only<1-3,5>{\\}%
  \only<4-4>{\\\rowcolor{orange!25}}O & P\only<1-3>{\\}%
  \only<4-4>{\\\rowcolor{orange!25}}\only<5>{\\\rowcolor{red!35}}Q & R\only<1-2,5>{\\}%
  \only<3-4>{\\\rowcolor{cyan!25}}S & T%
\end{tabular}
\end{frame}

\end{document}
Dimitris
  • 1,405

0 Answers0