I would like to use JetBrains Mono font in my document, in order to write some code. I’m using TeX Live 2020 on Windows 10, and I’m using lualatex and memoir class.

Is it possible to use JetBrains Mono’s ligatures? Thank you!


This font defines its ligatures in the calt feature, so \setmonofont{JetBrains Mono}[Contextuals=Alternate] will give you what you want. E.g,

\setmonofont{JetBrains Mono}[Contextuals=Alternate]
\texttt{</ \#? ]\#}


Note that TeX ligatures are not on by default for typewriter fonts. So if you want TeX’s ligature for, say, em dashes rather than the ligature defined by JetBrains, use \setmonofont{JetBrains Mono}[Contextuals=Alternate,Ligatures=TeX].

| improve this answer | |
  • :-) What strange symbols. What's their use? :-) +1 – Sebastiano Jun 1 at 22:11
  • 1
    @Sebastiano Just for fun, I guess, a typographer’s practice of the virtue of eutrapelia. – Thérèse Jun 1 at 22:30
  • Thank you very much for your explanation...after I have searched the word "eutrapelia" that I not know :-( εὐτραπελία=εὖ + τρέπω : Aristotele). – Sebastiano Jun 1 at 22:33
  • It works! But, I do not understand why it does not work inside lstlisting environment. Is there a solution? – Marco87 Jun 2 at 1:27
  • @Marco87 From the codeanatomy package? I’ve never used it, but give me a day (it’s time for bed here), and I’ll try to figure it out. – Thérèse Jun 2 at 1:32

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.