I try to highlight large paragraph of text, where there are various other macros such as \cite, \SI, \ref, etc. in between.
If I do something like the following:
\hl{the duration is \SI{4}{\second} as shown in Figure~\ref{fig:fig1} \citep{Doe2015}}
The text would truncate at "is", or even cannot compile sometimes.
Is there a way to write a macro like this:
\DeclareRobustCommand{\robusthl}[1]{
\ifnotmacro\hl{#1}\fi}
Thank you so much!

\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – LaRiFaRi Jun 16 '15 at 07:03