I have a German document with snippets of code where I need the " symbol as it is. Normally, if I insert an empty space after it, I get it printed, but this does not always work:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\begin{document}
\texttt{inventar <- read\_excel(" inventar.xlsx")}
\end{document}
Generates:
For the record:
\texttt{inventar <- read\_excel(``inventar.xlsx'')}.
Typesets the following (two single quote chars):
Is there a pragmatic way I can print these quotes reliably?
"{}
but since that looks like code you should probably consider switching to some dedicated package (likelistings
,minted
, ...).\verb
) instead of\texttt
. In this way you don't have to escape stuff like the underscore.