I am preparing a beamer presentation where I need to display some markdown code involving backticks. Specifically, I want to show backticks in the verbatim
environment. However, LaTeX renders them as open quotation marks.
How can I ensure backticks in the verbatim environment display as backticks?
Here's a minimal example:
\begin{verbatim}
Example: `2 + 2`
\end{verbatim}
An ideal solution would not require me to change the code itself.
Best Answer
You can also use the relative new package
upquote
, which is explicitly created for that task – together with the change for single quote marks, compare How to make a real apostrophe or single-quote in LaTeX.Without
upquote
:With
upquote
: