I use hf-tikz quite often in my beamer presentations.
One thing that I find quite annoying each time that I use it is that, if the rectangle providing the highlighting happens to be over some text preceding the one enclosed by the \tizmarkin and \tikzmarkend commands, such text is hidden.
See, for instance, this MWE
\documentclass{beamer}
\usepackage{tikz}
\usepackage[beamer]{hf-tikz}
\begin{document}
\begin{frame}
\begin{align*}
\mathbf{\hat{f}}(\tikzmarkin<2>[above left offset={-1.1,0.35},below right offset={1.0,-1.35}]{myhl}t+R\tikzmarkend{myhl}) &= a + b + c
\end{align*}
\end{frame}
\end{document}
yielding this (the misalignment is due to bad screenshots)
Is there a way to avoid this? Or (as I fear) is it part of the way hf-tikz works and cannot, thus, be somehow bypassed?





hf-tikzis not my first choice to highlight parts of a equation. Thetikzmarkpackage/library is very advanced and can deal with this much better. What are you trying to highlight actually? There's probably no need to manually adjust the offsets anymore. – Qrrbrbirlbel May 08 '23 at 15:30Edit: Wait, I just realised that it seems like it wasn't me starting the bounty. OK, I was very confused with all these answers popping up years later, and didn't realised that bounties can't be active for so long :|
– gbernardi May 09 '23 at 16:26