I am writing a report on ShareLaTeX and when I use lstinputlisting it renders some of my minus signs but not all.
I include my listing with:
\lstinputlisting[label=script:theory,caption={Calculating the expected
proportion of the genome covered by N
reads},language=R]{scripts/theory.R}
in scripts/theory.R I have:
G <- 1000 L <- 50 theoretic_proportion_of_genome_covered =
function(N){ a= N*L/(G-L) 1−exp(−a) }
And it renders like this:
As you can see, the first minus sign shows just fine but the next ones don't. It also has some weird spacings.
I have the following lstset:
\lstset{ language=R,
basicstyle=\footnotesize\ttfamily, numbers=left,
stepnumber=5,
numbersep=5pt, backgroundcolor=\color{white}, frame=single,
captionpos=b, keywordstyle=\color{blue},
commentstyle=\color{green} }
and my imports:
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{listings}
\usepackage{color}
\usepackage{appendix}
I already looked at the following pages but none of them relieved me:

scripts/theory.Rare no minus signs but endashes. Compare-in the arrows and in(G-L)(which are the right characters) to−in−exp(−a). The problem is the R code. – gernot Sep 20 '16 at 17:10