# Latex verbatim text 'as is' shows up as '???'

I have got some special characters I wish Latex to treat 'as is', which I understood Verbatim is for (I'm new to Latex).

\begin{verbatim}
┌─┐
q_0: |0>┤M├
└╥┘
c_0: 0 ═╩═
\end{verbatim}


However the PDF result shows up as ???

        ???
q_0: |0>?M?
???
c_0: 0 ???


How can I show/print my special characters properly?

• – Steven B. Segletes Nov 19 at 22:38
• you have tagged the question as ascii but the issue you have is just because ═╩ is not ascii – David Carlisle Nov 19 at 22:51

One possibility is with the pmboxdraw package:

\documentclass[]{article}
\usepackage{pmboxdraw}
\begin{document}

\begin{verbatim}
┌─┐
q_0: |0>┤M├
└╥┘
c_0: 0 ═╩═
\end{verbatim}

\end{document}


Another with lualatex and a suitable typewriter font:

\documentclass[]{article}
\usepackage{fontspec}
\setmonofont{DejaVuSansMono}
\begin{document}

\begin{verbatim}
┌─┐
q_0: |0>┤M├
└╥┘
c_0: 0 ═╩═
\end{verbatim}

\end{document}


• The first solution works great, though only when i put it in a new empty latex document. not my current one, trying to figure out why its not doing anything (compiles just fine) – Krijn van der Burg Nov 19 at 22:39
• Can't seem to get it working in my current document, would you have a clue why? – Krijn van der Burg Nov 19 at 22:56
• minimize your document until you find the conflicting package. – Ulrike Fischer Nov 19 at 23:03
• Even when i remove everything in the document, and copy exactly your answer.. it still doesnt work. Even though it does when I make a new document. I tried restarting Texteditor. – Krijn van der Burg Nov 19 at 23:25
• Are you sure that your document is utf8 encoded? – Ulrike Fischer Nov 19 at 23:32