0

I have some Greek letters in my Python script that I'd like to typeset with a listings environment. I use the FiraCode font that seems to support Greek letters. But the Greek letters sometimes do not appear where they should. My engine is luatex.

\documentclass{standalone}
\usepackage{fontspec}
\setmonofont{FiraCode}
\usepackage{listings}
\lstset{basicstyle = \ttfamily, language = Python}
\begin{document}
\begin{lstlisting}
  def test(λ):
    return λ
\end{lstlisting}
\end{document}

lambda is before braces

Is there a fix?

cjorssen
  • 10,032
  • 4
  • 36
  • 126

0 Answers0