I have an automatic command to add an ellipse on top of a particular piece of text so that I can highlight it in a presentation (heavily inpired by \newcommand: How to determine if in math mode (and then include $ $)?).
The problem is that the tikz node is bigger than the original text, which in a slide transition makes my text "dance".
Is there a way to prevent tikz from adding any space besides the actual text argument? I tried to use the remember picture,overlay options with phantom{} for the node size, but then the shading would appear on the wrong place.
MWE
\documentclass[]{beamer} \usepackage{tikz} \usetikzlibrary{shapes,calc} \newif\ifsmm \newcommand*{\mysmc}[1]{% \relax\ifmmode\smmtrue\else\smmfalse\fi% \tikz[baseline=(text.base)]% \node(text)[ellipse, fill=blue, fill opacity=0.2, inner sep=0.2mm, text opacity=1]% {\ifsmm$#1$\else#1\fi};% } \begin{document} \begin{frame} This is the example without a highlighted word.\\ This is \mysmc{the} example with a highlighted word. (text is shifted)\\[1cm] This \mysmc{\color{blue}is} the example with a different size. $a^2+\mysmc{b^2}=c$ \end{frame} \end{document} 

inner sep=0pt?inner sep=0ptdoes not resolve the issue