# Font & Tools to print Julia code listings?

**URL:** https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934
**Category:** General Usage
**Created:** [May 27, 2021, 2:29pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934 "2021-05-27T14:29:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)
#### Post date: [May 27, 2021, 2:29pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/1 "2021-05-27T14:29:45Z")

</div>

I have been struggling for a long time trying to find a way to print Julia code listing where Unicode characters are properly rendered. I have been using enscript for many years to print C++ code, however it does not support Unicode fonts. I had some success with paps and I have tried to use it with the JuliaMono font without success. I am wondering if anyone has found a solution…

---

<div class="post-metadata">

### Author: ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)
#### Post date: [May 27, 2021, 4:49pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/2 "2021-05-27T16:49:13Z")

</div>

Would code listing in a latex document work for you, or do you have another use case in mind?

---

<div class="post-metadata">

### Author: ![Arrigo\_Benedetti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrigo_benedetti/32/25545_2.png) [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)
#### Post date: [May 27, 2021, 7:41pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/3 "2021-05-27T19:41:36Z")

</div>

Conversion to LaTeX would be ok, even if LaTeX is kind of overkill for this problem. If enscript supported Unicode characters that would be perfect.

---

<div class="post-metadata">

### Author: ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)
#### Post date: [May 27, 2021, 7:53pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/4 "2021-05-27T19:53:34Z")

</div>

I guess it depends on what you are using it for, but if you include the file in latex and use `minted` (and a xelatex or lualatex to ensure you can use unicode characters) then I think it should work well. See [What do you use to embed Julia code in LaTeX?](https://discourse.julialang.org/t/what-do-you-use-to-embed-julia-code-in-latex/23992)

But if you literally are just trying to print this out to a printer, then it is probably overkill.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [May 27, 2021, 9:22pm UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/5 "2021-05-27T21:22:46Z")

</div>

Just in case, what about using the VS Code extension ‘PrintCode’?

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [May 28, 2021, 4:14am UTC](https://discourse.julialang.org/t/font-tools-to-print-julia-code-listings/61934/6 "2021-05-28T04:14:59Z")

</div>

The “Markdown PDF” plug in in vscode produces a nice pdf with unicode characters. Literate.jl could be made to produce the markdown file if you don’t want to do that manually.
