0

MWE:

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{minted}
\begin{document}
\begin{minted}[breaklines]{haskell}
--   `∀x. (id <$> x) ≅ x`
\end{minted}
\end{document}

Compiles well with:

xelatex --shell-escape ./haskell.tex

The symbols and are missing in the output file.

1

1 Answer 1

4

You should use a font which has the glyphs:

\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{minted}
\usepackage{fontspec}
\setmonofont{DejaVu Sans Mono}
\begin{document}
\begin{minted}[breaklines]{haskell}
--   `∀x. (id <$> x) ≅ x`
\end{minted}
\end{document}

enter image description here

4
  • @Davislor the OP used xelatex and minted is a verbatim environment, so no 8bit fonts were involved even without fontspec. Commented Aug 9, 2019 at 5:53
  • I think I might have misunderstood you. The \setmonofont to one that contains the symbols is necessary for your answer to work, right?
    – Davislor
    Commented Aug 9, 2019 at 6:09
  • @Davislor yes, as the default Latin modern mono open type font hasn't the glyphs. I'm exchanging unicode fonts, I'm not switching from 8bit to unicode. Commented Aug 9, 2019 at 6:24
  • Testing the original snippet with pdffonts, I see that you are correct.
    – Davislor
    Commented Aug 9, 2019 at 17:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .