Possible Duplicate:
How to make a real apostrophe or single-quote in LaTeX
I'm building a Python Regex cheat sheet using Latex, which has the following line:
\texttt{re.match('a\textbackslash sb', 'a b')
However, when the line is copied from the PDF document, the apostrophe (') is converted to Unicode Character 'RIGHT SINGLE QUOTATION MARK' (U+2019) (’):
re.match(’a\sb’, ’a b’)
This text is not recognizable by the Python interpreter.
Is there a LaTex tag for code that preserves the original characters?
\usepackage[T1]{fontenc}– David Carlisle Oct 22 '12 at 09:29