7

I've been able to typeset julia code using listings package as mentioned in the answer here.

But I also wanted to display Julia output in my latex document, how can I achieve this ?

1 Answer 1

4

Use the minted package. It does syntax highlighting with the pygments Python library, which happens to support Julia.

Additionally, Julia interactive output is supported through the jlcon lexer. It's not listed on the main site's language list, but it is listed on pygmentize -L.

4
  • This offers a good solution to print julia console output, but is there a way to highlight julia output from a jupyter ipython notebook as well ?
    – stark
    Feb 1, 2016 at 6:14
  • You mean highlighting an interactive Julia session? Actually, yes you can. The lexer you want is named jlcon.
    – JesseTG
    Feb 2, 2016 at 1:07
  • 1
    dead link above (code sample). Apr 18, 2020 at 8:32
  • @ja72 Thanks for pointing that out. I'll fix that right now.
    – JesseTG
    Apr 19, 2020 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.