Consider the following minimal example that combines Beamer + Minted:


let foobar ~x ~y = x + y

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?

2 Answers 2


This is actually a font issue. Try \usepackage[T1]{fontenc} plus \usepackage{lmodern}, or something similar.

fixed tilde


I had issue with tilde also after specifying font to \usepackage[T1]{fontenc} and \usepackage{lmodern}. I solved problem by setting:


% or equvalently


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.