4

Here is a quick question, how to use tex to print this ' symbol? An example is shown below:

data 'a list = Nil | Cons (e, 'a list)

I tried to use ' or `, but they all looks bad.. I am sorry but I am not a native English speaker, so I don't even know the name of '..

Could anyone help me on this simple problem? thank you

musarithmia
  • 12,463

1 Answers1

5

You can use the package upquote and put the code in a verbatim environment.

\documentclass{article}
\usepackage{upquote}
\begin{document}
\begin{verbatim}
data 'a list = Nil | Cons (e, 'a list)
\end{verbatim}
\end{document}

enter image description here

musarithmia
  • 12,463