\textfont-1 未定义,\scriptfont-1 在 LuaTeX 和 MikTex 的 unicode-math 中未定义

\textfont-1 未定义,\scriptfont-1 在 LuaTeX 和 MikTex 的 unicode-math 中未定义

我刚刚安装了 MikTex 更新(2022-11-25),现在即使是最简单的文档也无法编译:

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$a_b$
\end{document}

导致以下错误:

! \textfont-1 is undefined (character 119887).
l.6 $a_b$
       
Somewhere in the math formula just ended, you used the
stated character from an undefined font family. For example,
plain TeX doesn't allow \it or \sl in subscripts. Proceed,
and I'll try to forget that I needed that character.

! \scriptfont-1 is undefined (character 119887).
l.6 $a_b$
       
Somewhere in the math formula just ended, you used the
stated character from an undefined font family. For example,
plain TeX doesn't allow \it or \sl in subscripts. Proceed,
and I'll try to forget that I needed that character.

删除下标或 unicode-math 包可解决此最小工作示例中的问题。以下是已更新的包:

更新软件包第一部分 更新软件包(第 2 部分) 更新软件包第 3 部分

MikTex 诊断:

ReportDate: 2022-11-25 15:16:38
CurrentVersion: 22.11
SetupDate: 2018-03-20 09:53:00
SetupVersion: 2.9
Configuration: Regular
GitInfo: 183f49e / 2022-11-18 11:10:21
OS: Windows 6.3.9600
SharedSetup: no
LinkTargetDirectory: C:\Users\XXX\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64
PathOkay: yes
LastUpdateCheck: 2022-11-25 15:02:57
LastUpdate: 2022-11-25 14:25:35
LastUpdateDb: 2022-11-25 15:05:23
SystemAdmin: yes
RootPrivileges: no
AdminMode: no
Root0: C:\Users\XXX\AppData\Roaming\MiKTeX\2.9
Root1: C:\Users\XXX\AppData\Local\MiKTeX\2.9
Root2: C:\Users\XXX\AppData\Local\Programs\MiKTeX 2.9
UserInstall: C:\Users\XXX\AppData\Local\Programs\MiKTeX 2.9
UserConfig: C:\Users\XXX\AppData\Roaming\MiKTeX\2.9
UserData: C:\Users\XXX\AppData\Local\MiKTeX\2.9

The following issues were detected:
  1: minor issue: You are running MiKTeX on an unsupported version of Windows.

答案1

Miktex 使用的 luatex 版本似乎存在错误。添加\variablefam=-1似乎暂时可以修复此问题,但我也会在 miktex 问题跟踪器中报告此问题。

\variablefam=-1
\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$a_b$
\end{document}

相关内容