3

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?

2 Answers 2

4

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

fixed tilde

2

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

\setminted[r]{fontfamily=courier}

% or equvalently

\mint[fontfamily=courier]{r}|lm(y~x)|

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.