What is the simple way to extract julia code to pdf with exact colour and place?

I want to extract my julia code on atom notebook to pdf file, how to do it with the same colour and place?

I’m not sure this is possible, but to be fair, if you plan to write code in order to “publish” it (as in, export to PDF for sharing) a notebook system like Pluto or Jupyter might be better, especially if stuff like plots is meant to be part of the exported pdf.

using ctrl+p on jupyter, and saved as pdf solved my problem.

Weave is good for this if one doesn’t want to use a notebook