This question led to a new package:
hf-tikz
Minimal working example:
\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\begin{align}
a_i + b_j = 10 & \forall i\in I, j\in J \\
c_j + d_j + a_i >= 30 & \forall i\in I, j\in J
\end{align}
\end{frame}
\end{document}
Suppose I want to highlight both a_i
's in the equations and then the second equation as a whole. I could use \alert<2>
on each a_i
, but this would not work with the second equation, the part after the &
would need to be enclosed in a separated \alert<3>
directive. However I have several equations to highlight at once, so I'd prefer a method that works across "groups", i.e across &
.
Secondly, if it was possible, I'd prefer, rather to use alert, to enclose the equations in boxes, like with \boxed
, and have labels on such boxes, for descriptive purposes.
What packages I need to look into, if any?
EDIT: is there something else beside TikZ (and possibly simpler)? I can't get it to work with my outdated TeXLive 2007, and I can't update the latter either.
Best Answer
By following the method shown in Background coloring with overlay specification in algorithm2e + beamer package, it is possible to build this MWE:
that allows to get those two frames:
Thus you can select the zone you want to highlight thanks to
\tikzmark
, an entire equation or just a part displaying it as"alert"
.Beware that with the latter method, one can not place tabs (with
&
) inside the\Highlight
command.Notice that it also avoids the so called "jumping effect" visible in the TikZ-free solution: