I'm typesetting a document with examples of bash code. How do I make the code like
`pwd -P`
appear with the same kind of quotes? I want the readers of the document to be able to copy and paste the code directly into a terminal. Latex is giving me the opening single quote symbol ‘.
Best Answer
You could also use the
literate
key to define literate character replacements:which gives
The copy/paste result from the PDF file is the same for both lines for me. However, note the small spacing difference. I'm not entirely sure which of these spacings is the correct one, but I'm temped to say it's the one of the second line because the
literate
explicitly tellslistings
to treat the replacement as a single character.