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:

[![enter image description here](https://i.stack.imgur.com/oi9aK.png)](https://i.stack.imgur.com/oi9aK.png)

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:

* [missing minus sign in R code using latex](https://tex.stackexchange.com/questions/262128/missing-minus-sign-in-r-code-using-latex)
* [Minus sign disappears in lstlisting if I import the semantic package](https://tex.stackexchange.com/questions/184648/minus-sign-disappears-in-lstlisting-if-i-import-the-semantic-package)
* [Minus signs vanish with listings and breqn - any solutions?](https://tex.stackexchange.com/questions/6827/minus-signs-vanish-with-listings-and-breqn-any-solutions)