The built-in Program Listings environment has its issues. I’ve had much more luck with Minted. This post covers much of what’s needed: What do you use to embed Julia code in LaTeX? - #2 by baggepinnen
1 Like