# Non-raised tildes in a minted environment

Consider the following minimal example that combines Beamer + Minted:

\documentclass[11pt,utf8]{beamer}
\usepackage{minted}

\begin{document}
\begin{frame}[fragile]
\frametitle{Foobar}
\begin{minted}{ocaml}
let foobar ~x ~y = x + y
\end{minted}
\end{frame}
\end{document}


The problem is that the tilde characters in function foobar inside the minted environment are rendered almost as superscripts. I want them to be rendered as is customary in monospaced fonts: vertically centered. Any ideas?

This is actually a font issue. Try \usepackage[T1]{fontenc} plus \usepackage{lmodern}, or something similar.
I had issue with tilde also after specifying font to \usepackage[T1]{fontenc} and \usepackage{lmodern}. I solved problem by setting: