3

I am using overleaf to write a LaTeX document. I want to include some R code blocks with minted, but minted displays my arrows in the code "<-" like this: "¡-". How can I fix this? I encoded both the code and my LaTeX document in utf8. It also omits underscore symbols "_" and brackets "{}.

It does not work if I include the code directly

\begin{minted}[linenos,breaklines,bgcolor=myLightGray]{r}
check_create_dir <- function(path) {
    print("using existing folder")
}
\end{minted}

And if I load a file:

\inputminted[linenos,breaklines,bgcolor=myLightGray]{R}{code/test.R}

pdf output image

Zoe
  • 163

0 Answers0