2

The following snippet produces the desired result outside of the verbatim block, but not within the verbatim block. I guess I have to specify a font for verbatim mode that contains support for the symbols codepage.

Can someone help me out -- how do I do this, and perhaps with a good font suggestion?

Snippet:

\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont{DejaVu Sans}

\begin{document}
ext:  ".☃"
\begin{verbatim}
stem: "föõbår"
ext:  ".☃"
\end{verbatim}

\end{document}

1 Answer 1

4

You should set as mono font a font that has the symbol:

\documentclass[11pt]{article}
\usepackage{fontspec}
\setmainfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
\begin{document}
ext:  ".☃"
\begin{verbatim}
stem: "föõbår"
ext:  ".☃"
\end{verbatim}

\end{document}

enter image description here

You must log in to answer this question.

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