3

I would like to highlight some specific words inside the minted environment when using beamer.

 \documentclass[14pt]{beamer}
\usepackage{minted}

\begin{document}

\begin{frame}[fragile]{}
\begin{figure}
\centering
\begin{minted}[mathescape,
           gobble=2,
           linenos,
           fontsize=\tiny,
           framesep=2mm]{ocaml}
  let process il =
    let module IV = Instr_visitor in
    let visit i t = instrument i t in
    IV.map_instr IU.is_mem_write visit il
    |> insert_instr_list BEFORE !il_update
\end{minted}
\end{figure}
\end{frame}

\end{document}

For example, for the code below, I would like to highlight the visit at line four and three using red color. I know the solution in lstlisting, but still, I cannot find a solution towards minted environment, could anyone help me on that? Thank you.

enter image description here

0 Answers0