I would like to insert some code 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}
However, it just cannot be centralized even though I use the centering
command. Could anyone shed some light on how to centralize it? Thank you!
Update: This is how it looks here: