编辑

编辑

我问了一个非常简单的问题。我在 Linux 上使用 XeLaTeX,它运行良好。我知道 Latin Modern Roman 是 使用的默认字体\usepackage{fontspec}。但是我想知道它的名字是什么:我尝试使用

\setmainfont{Latin Modern Roman}

但它告诉我找不到这样的字体。即使在 ShareLaTeX 中我也遇到了同样的问题。如果我决定切换字体然后返回 Latin Modern,这会很有用吗?我应该使用哪个名称?

谢谢

编辑

fc-match -a modern | grep -i "latin modern"在命令 shell 上执行我得到

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"

似乎我拥有的所有拉丁现代语言都依赖于 MathJax,这很奇怪。

答案1

只需写入70-prevent-MJ.conf以下/etc/fonts/conf.d内容的文件即可

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

这可以防止fontconfig索引 MathJax 字体。

相关内容