I have a 2 column latex template (IEEEtran), in which I put 2 algorithms side by side:
\documentclass[10pt,conference]{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{xcolor}
\def\HiLi{\leavevmode\rlap{\hbox to \hsize{\color{yellow!50}\leaders\hrule height .8\baselineskip depth .5ex\hfill}}}
\begin{document}
\begin{figure*}[htbp]
\centering
\begin{minipage}[t]{0.49\textwidth}
\begin{algorithm}[H]
\caption{Foo}
\begin{algorithmic}[1]
\REQUIRE $Beer$
\HiLi \STATE $s \leftarrow HighlightThis$
\STATE $f \leftarrow Foo()$
\end{algorithmic}
\end{algorithm}
\end{minipage}
\begin{minipage}[t]{0.49\textwidth}
\begin{algorithm}[H]
\caption{Bar}
\begin{algorithmic}[1]
\REQUIRE $Wine$\\
\STATE $s \leftarrow Bar()$
\STATE $b \leftarrow Bar1()$
\end{algorithmic}
\end{algorithm}
\vfill
\end{minipage}
\end{figure*}
\end{document}
My goal is to highlight the line "HighlightThis". I've tried these 2: Approach1, TikZ Approach.
The problem is with both approaches, the highlight gets completely misplaced:
Approach 1 result:

How can this be done? Thanks for your help

\HiLiis defined. – Mico Aug 25 '20 at 18:58