找不到 Latin Modern Roman 字体

找不到 Latin Modern Roman 字体

我正在托管我的 Overleaf,但遇到了麻烦。我试图编译我的 BSc 论文模板,但总是收到错误,提示缺少 Latin Modern Roman。Latin Modern Roman 是 TeX Live 的一部分,阅读此处,因此它应该可以工作。

我的编译器设置为XeLaTeX,按照作者的建议。(我不能在这里分享这个模板)

我尝试安装scheme-full但总是出现几个错误,而且没有解决任何问题。

我尝试注释整个有问题的语句,编译时没有错误。但我不确定它现在是否使用了正确的字体。

我已经安装了 mathspec 包

❯ docker exec overleaf tlmgr info mathspec
package:     mathspec
category:    Package
[...]
installed:   Yes
revision:    42773
sizes:       run: 45k
relocatable: No
cat-version: 0.2b
cat-license: lppl
cat-topics:  font-maths font-sel
collection:  collection-latexrecommended

这些是我的计划

i scheme-basic: basic scheme (plain and latex)
  scheme-bookpub: book publishing scheme (core LaTeX and add-ons)
  scheme-context: ConTeXt scheme
  scheme-full: full scheme (everything)
  scheme-gust: GUST TeX Live scheme
i scheme-infraonly: infrastructure-only scheme (no TeX at all)
  scheme-medium: medium scheme (small + more packages and languages)
i scheme-minimal: minimal scheme (plain only)
  scheme-small: small scheme (basic + xetex, metapost, a few languages)
i scheme-tetex: teTeX scheme (more than medium, but nowhere near full)

此部分产生错误

\ifXeTeX
    \RequirePackage{mathspec} % wczytuje również fontspec
    \setmainfont{Latin Modern Roman}
    \setromanfont{Latin Modern Roman}
    \setsansfont{Latin Modern Sans}
    \setmonofont{Latin Modern Mono}
    \setmathrm{Latin Modern Math}
    \setmathfont(Digits,Latin)[Scale=MatchLowercase]{Latin Modern Math}
\else
    \RequirePackage{lmodern}
    \renewcommand*\familydefault{\sfdefault}
    \RequirePackage[T1]{fontenc}
\fi

完整日志(以防万一,如果我泄露了太多信息,我很抱歉)

这就是所讨论的错误(为方便阅读,已删除)

! Package fontspec Error: The font "Latin Modern Roman" cannot be found.

For immediate help type H <return>.
 ...                                              
                                                  
l.104     \setromanfont
                       {Latin Modern Roman}

[...]

Package fontspec Info: Could not resolve font "Latin Modern Roman/BI" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "Latin Modern Roman/B" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "Latin Modern Roman/I" (it
(fontspec)             probably doesn't exist).

我运行了最少的文档,并且没有给出任何错误

\documentclass{article}\usepackage{fontspec}\begin{document}Hello, world!\end{document}

相关内容