I need to create a XeLaTeX document with many fonts. I will use many fonts because my documents talk about fonts.

But I want to use Latin Modern as main font. So I downloaded and installed ALL the open type font on my win7 via http://www.gust.org.pl/projects/e-foundry/latin-modern

First I just did a simple :

\setmainfont{Latin Modern Roman}

It worked, but for instance I discovered that I couldn't get the small caps. Then I tried a:

\setmainfont[Ligatures=TeX,SmallCapsFont={* Caps}]{Latin Modern Roman}  

It is working fine but my question is what is the best way to call the LM font in the preamble in order to be sure to get the best typography?

  • 3
    fontspec uses Latin Modern by default, you don’t need any action to use it. – Khaled Hosny May 21 '13 at 7:03
  • @KhaledHosny AH ok indeed it was simple like that witouth any "setmainfont" "setmonofont" it seems to work perfectely. Thank you. – S12000 May 21 '13 at 10:03
  • @KhaledHosny the solution you gave me is perfect. May you put it as answer. Then I can validate the post. Thanks. – S12000 May 26 '13 at 23:38

fontspec uses Latin Modern by default, you don’t need any action to use it.

  • 1
    @KhaledHosny Any chance you could humor me and demonstrate how you would do it if you wanted to? A platform-independent way of defining a default latex font, something like: \newfontfamily\latinmodern{lmroman10-regular} – Jonathan Komar Jan 26 '16 at 11:07
  • What if you changed the main font and want to change back to Latin Modern? – Clément Aug 7 '16 at 17:02
  • 1
    It does not really work by default, see here. – Alexey Feb 8 '17 at 20:21
  • @Alexey: So you are replying in 2017 to an answer from 2013 with a mailing list post from 2008 answering a totally unrelated question? – Khaled Hosny Feb 22 '17 at 14:12
  • How is the question unrelated? "Latin Modern" does not quite work by default in XeLaTeX. It has to be loaded with \setmainfont, otherwise some features, like \oldstylenums, do not work. – Alexey Feb 22 '17 at 16:35

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.