This seems like it should be simple! After creating a very complex table using multirow and many other table related beamer packages that I have just learned about, I now want to highlight parts of it during my talk with successful overlays (controlled by \pause or somesuch).

I had envisioned doing three textblock calls such as:

   Above the Saddle**

Where each one has a different x-y location, a different colored background, different words.

My problem is that I want the textblockcolor to be opaque or translucent so that the text below it (i.e., the table text) is visable.

I have tried the "transparent" package - with much failure, I have tried many other false leads (so many that I have forgotten them all). I have studied the documentation for textpos (thinking that maybe I could do what I wanted with its overlay setting), any ideas?

Naturally I don't want the text to be translucent, opaque, or transparent. It seems like I would want to use "opacity" but searching on that thread doesn't lead me where I want to do -- of course, it would be nice if I could vary the color of text in each textblock but I can live with black.

Thanks for any help and thoughts.


One possibility is to use the improved version of \tikzmark (by Andrew Stacey). The idea is simple: inside the table you use \tikzmark to put "marks" for each block (say, \tikzmark{start1} where you want the first block to begin and \tikzmark{end1} where the first block should end; \tikzmark{start2} where you want the second block to begin and \tikzmark{end2} where the second block should end, and so forth).

Then, for each block, you simply use the \MyBox macro to draw the boxes with their text; the syntax is


where the optional argument controls the position of <text>, <color> specifies the color used for the block and the text, <start-mark> and <end-mark> are the marks from the previous step, and <text> is the text that will accompany the box. Of course, you can define \MyBox in a different way to draw the colored box and to place the text according to your needs.


% code by Andrew Stacey
% http://tex.stackexchange.com/a/50054/3954    
  remember picture with id/.style={%
    remember picture,
    save picture id=#1,
  save picture id/.code={%
  if picture id/.code args={#1#2#3}{%

  \expandafter\gdef\csname save@pt@#1\endcsname{#2}%


  \pgfsys@getposition{\csname save@pt@\tmk@label\endcsname}\save@orig@pic%
  \advance\pgf@x by -\pgf@xa
  \advance\pgf@y by -\pgf@ya
\tikz[remember picture with id=#2] #1;}
% end of code by Andrew Stacey

  \tikz[remember picture,overlay,pin distance=0cm]
  {\draw[draw=#2,fill=#2!40,line width=1pt,rectangle,rounded corners]
( $ (pic cs:#3) + (0,2ex) $ ) rectangle ( $ (pic cs:#4) + (0,-1ex) $ );
  \node[fit = (pic cs:#3) (pic cs:#4),label=#1:\textcolor{#2!80!black}{\parbox{2cm}{\raggedright#5}}] 


\begin{frame}{Test Frame}

\onslide<2>{\MyBox{blue}{start1}{end1}{Some text 1}}
\onslide<3>{\MyBox[left]{green!40!black}{start2}{end2}{Some text 2}}
\onslide<4>{\MyBox{orange}{start3}{end3}{Some text 3}}
\onslide<5>{\MyBox{yellow!70!black}{start4}{end4}{Some text 4}}

Header1 & Header 2 & Header 3 \\
\tikzmark{start1}Column1a & Column2a & Column3a \\
Column1a & Column2a & Column3a\tikzmark{end1} \\
\tikzmark{start4}Column1b & Column2b & Column3b \\
Column1c & Column2c & Column3c \\
\tikzmark{start2}Column1d & Column2d & Column3d \\
Column1e & Column2e & Column3e \\
Column1f & Column2f & Column3f \\
Column1g & Column2g & Column3g \\
Column1h & Column2h & Column3h\tikzmark{end4} \\
Column1i & Column2i & Column3i \\
Column1j & \tikzmark{start3}Column2j & Column3j \\
Column1k & Column2k\tikzmark{end2} & Column3k\tikzmark{end3} \\



Here's an animation of the resulting document:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.