0

I'm askin a very simple question. I'm using XeLaTeX on Linux, and it's working perfectly. I know that Latin Modern Roman is the default font used by \usepackage{fontspec}. However I would like to know what is its name: I tried to use

\setmainfont{Latin Modern Roman}

but it tells me that it couldn't find such a font. Even in ShareLaTeX I have the same problem. This can be useful if I decide to switch font and then to return to Latin Modern? Which name should I use?

thanks

EDIT

Performing fc-match -a modern | grep -i "latin modern" on the command shell I get

LatinModernMathJax_Alphabets-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Arrows-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_DoubleStruck-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Fraktur-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Latin-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Main-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Marks-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Misc-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Monospace-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_NonUnicode-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Normal-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Operators-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_SansSerif-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Script-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Shapes-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size1-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size2-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size3-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size4-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size5-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size6-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Size7-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Symbols-Regular.woff: "Latin Modern Math" "Regular"
LatinModernMathJax_Variants-Regular.woff: "Latin Modern Math" "Regular"

it seems that all Latin Modern I have depend on MathJax, it's strange.

  • 1
    whether you can access a font by internal font name depends on where it is installed but for latin modern \fontfamily{lmr}\selectfont should always work – David Carlisle Dec 14 '16 at 15:56
  • Try \setmainfont{LM Roman 10} (or 12 if your base size is 12pt). – Bernard Dec 14 '16 at 16:20
  • It doesn't work, while \setmainfont{Latin Modern Roman} works with lualatex. How can I make it work also with xelatex? – MaPo Dec 14 '16 at 16:23
  • What do you get at a prompt with fc-match -a modern | grep -i "latin modern"? – Arash Esbati Dec 14 '16 at 17:06
  • @ArashEsbati I've just edited my question – MaPo Dec 14 '16 at 17:17
0

Just one has to write a file 70-prevent-MJ.conf in /etc/fonts/conf.d with the following content

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <selectfont>
  <rejectfont><glob>/usr/share/fonts/mathjax/*</glob></rejectfont>
 </selectfont>
</fontconfig>

This prevent fontconfig to index MathJax font.

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.