I have a listing to be used in verbatim (acutally Verbatim
) that uses unicode characters such as ∀, ∃, →, ∨. Using
\DeclareUnicodeCharacter{2203}{\ensuremath\exists}
they do appear in the listing, but obviously in the wrong font.
For → I got the desired result using
\usepackage{textcomp}
\DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi}
but I do not see how to do it for ∃, ∀ and ∨.
MWE:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\DeclareUnicodeCharacter{2192}{\ifmmode\to\else\textrightarrow\fi}
\DeclareUnicodeCharacter{2203}{\ensuremath\exists}
\begin{document}
\begin{verbatim}
Make this → ∃ look nice!
\end{verbatim}
\end{document}
I’d like to stick to latex (i.e. not xetex). I would prefer to stick to the default type writer font (Computer Modern Typewriter), but if it only works with a different font (such as DejaVu Sans Mono), then that would be ok as well.
DejaVu Sans Mono
using thefonttable
package, but could not find it in eitherT1
orTS1
font encoding. Which encoding is used for such symbols?