问题

问题

错误报告

也可以看看马克斯·切尔诺夫的评论。感谢 Max 为第一个问题提供指导并提示第二个问题和第三个问题。

版本

Vanilla(即上游)TeX Live 2024 尚未完全更新。

$ luaotfload-tool --version

luaotfload-tool:
Luaotfload font management and diagnostic utility.
License: GNU GPL v2.0.
Report problems to <https://github.com/latex3/luaotfload/issues>

luaotfload-tool version: "3.28"
Revision: nil
Lua interpreter: stock; version "Lua 5.3"
Luatex version: 1.18
Platform: type=unix name=linux
+  machine: x86_64
+ nodename: MyComputer
+  release: 6.8.2-arch2-1
+  sysname: Linux
+  version: #1 SMP PREEMPT_DYNAMIC Thu, 28 Mar 2024 17:06:35 +0000
Index: version=6 created="2024-03-26 19:18:36" modified="2024-04-05 01:10:24"

$ tlmgr info luaotfload
package:     luaotfload
category:    Package
shortdesc:   OpenType 'loader' for Plain TeX and LaTeX
longdesc:    The package adopts the TrueType/OpenType Font loader code provided in ConTeXt, and adapts it to use in Plain TeX and LaTeX. It works under LuaLaTeX only.
installed:   Yes
revision:    70232
sizes:       src: 25k, doc: 1105k, run: 7665k, bin: 5k
relocatable: No
cat-version: 3.28
cat-license: gpl2
cat-topics:  font-use luatex
cat-contact-support: https://github.com/latex3/luaotfload/issues
cat-contact-repository: https://github.com/latex3/luaotfload
collection:  collection-luatex

问题

我并不经常使用 LuaTeX,但据我所知,该引擎在我的系统上可以轻松找到并使用字体。

- 寻找

但是,如果我尝试在命令行中使用luaotfload-tool,情况就不同了。它可以毫无问题地生成字体列表、报告其版本或传递其帮助消息,但尝试搜索数据库会失败。

$ luaotfload-tool --find "Noto Sans"
...4/texmf-dist/tex/luatex/luaotfload/luaotfload-arabic.lua:19: attempt to index a nil value (global 'node')

--诊断=文件

为了诊断这个问题,我尝试了帮助消息中列出的第一个“检查”选项。

$ luaotfload-tool --diagnose=files
luaotfload | diagnose : ================ verify files =================
luaotfload | diagnose : Luaotfload revision 73dac18445938c6c54118045944817c4e8c59a1c.
luaotfload | diagnose : Committed by Marcel Fabian Krüger <[email protected]>.
luaotfload | diagnose : Timestamp 2024-02-28 06:18:10 +0100.
luaotfload | diagnose : Testing 88 files for integrity.
<successful lines omitted>
luaotfload | diagnose : FAILED: file mktests missing.
luaotfload | diagnose : FAILED: file mkstatus missing.
luaotfload | diagnose : FAILED: file mkcharacters missing.
luaotfload | diagnose : FAILED: file mkglyphlist missing.
luaotfload | diagnose : FAILED: file mkimport missing.
<successful lines omitted>
luaotfload | diagnose : ===============================================
WARNING
===============================================

The diagnostic detected 5 errors.

This version of luaotfload may have been
tampered with. Modified versions of the
luaotfload source are unsupported. Read the log
carefully and get a clean version from CTAN or
github:

× http://www.ctan.org/pkg/luaotfload
× https://github.com/latex3/luaotfload/releases

If you are uncertain as to how to proceed, then
ask on the lualatex mailing list:

http://www.tug.org/mailman/listinfo/lualatex-dev

===============================================

说实话,这个消息似乎过于危言耸听。虽然可能的有人篡改了我的副本luaotfload-tool,但这种可能性似乎不大。(如果这是企图做些邪恶的事情,那似乎是一次极其拙劣的尝试。)

剩余的“支票”怎么办?

  • environmentindexrepository告诉我我may sleep well
  • repository尽管如此,还是报告无法访问存储库,但这是预料之中的,因为我正在使用 TeX Live 的包。

--诊断=权限

但又permissions报告麻烦:

luaotfload | diagnose : =============== file permissions ==============
luaotfload | diagnose : Checking permissions of /home/username/.texlive2024/texmf-var/luatex-cache/generic/.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxr-xr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/username/.texlive2024/texmf-var/luatex-cache/generic/names.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxr-xr-x.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/username/.texlive2024/texmf-var/luatex-cache/generic/names/luaotfload-names.lua.gz.
luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-r--r--.
luaotfload | diagnose : Readable: ok.
luaotfload | diagnose : Writable: ok.
luaotfload | diagnose : Checking permissions of /home/username/.texlive2024/texmf-var/luatex-cache/generic/names/luaotfload-names.luc.

attr    /home/username/.texlive2024/texmf-var/luatex-cache/generic/names/luaotfload-names.luc   nil

失败是因为文件不存在。luaotfload-names.luc存在,但仅以压缩格式存在luaotfload-names.luc.gz。使用 LuaTeX 时这显然没问题,但使用 时就不行luaotfload-tool

概括

所以我显然不只有一个问题,而是有两个问题:

  1. luaotfload-tool期望找到 5 个 TeX Live 包(我的副本中)中不存在的脚本。
  2. luaotfload-tool希望找到一个未压缩格式的名称数据库,但(至少默认情况下)该数据库仅以压缩格式创建。

这些是软件错误、包装错误、故意修改还是只是用户愚蠢的行为?

笔记:我没有提供 MWE,正是因为它应该是 MWE 而不是 MNWE --- 我没有发现编译文档的任何问题。

相关内容