I'm having a strange problem with listings. I'm trying to use matching double quotes around strings, as in this minimal example:
\documentclass{article}
\usepackage{listings}
\lstset{
language=Java,
tabsize=2,
numbers=left,
basicstyle=\footnotesize
}
\begin{document}
\begin{lstlisting}
void my_method() {
int test = 0;
some_method(``string");
boolean b = false;
some_method(``string");
}
\end{lstlisting}
\end{document}
First of all, the backticks render individually instead of as a nice curly left double quote like I want. And, well, the bigger problem is that after inserting the backticks it starts showing all the whitespace in my code in between the two strings, even when I add showspaces=false to my settings, as in the following screenshot:
I've found a lot about how to use straight double quotes, but I actually do want the curly quotes. Does anyone know how I can insert the left quotation marks properly?