add tag
topnush
I have this MWE:

```
\documentclass{beamer}
\usepackage[many]{tcolorbox}

\usepackage{listings}
\lstdefinestyle{duckstyle}{%
    moredelim=[is][\color{red}]{|}{|},
    mathescape=true,
    escapechar=@,
    basicstyle=\ttfamily,
    columns=fullflexible
}
\lstset{style=duckstyle}


\newcommand{\ubar}[1]{\alt<+>{\underaccent{\bar}{#1}}{#1}}
\tcbuselibrary{skins}
\tcbset{
%	arc=0pt,
%	outer arc=0pt,
	colback=white,
}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
	shapes,
	tikzmark, shapes.geometric}




\newcommand{\Proc}[1]{\textsc{#1}}
\newcommand{\Blue}[1]{\textcolor{varcolor}{#1}}
\definecolor{varcolor}{RGB}{15,122,183}


\begin{document}


\begin{frame}[fragile]

\begin{tcolorbox}[colback=blue!5!white, text width=4.5cm,  left=7pt, right=10pt]
\begin{lstlisting}[basicstyle=\linespread{0.9}\ttfamily, mathescape,tabsize=4]
@\Proc{Foo}@(@\Blue{j}@)

\end{lstlisting}
\end{tcolorbox}
\end{frame}


\end{document}
```

I would like to replace @\Proc{Foo}@(@\Blue{j}@) with @\Proc{Foo}@(@\Blue{a_i}@) and have a_i rendered as math.  How can I do that?

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.