在 texlive2019 发行版中,tex 引擎 luatex,使用的字体可由其他引擎识别(xetex、pdftex、csplain)。OPmac 的宏 - plaintex,无 latex。
源文件:
\input opmac
\input luaotfload.sty
\font\tenrm="DejaVu Serif"
\tenrm
Hello
\bye
终端输出,全部在 luatex $file 运行之后:
: 0 ~/proj: luatex test_opmac_luatex
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
restricted system commands enabled.
(./test_opmac_luatex (/home/m___/.texmf/tex/mtex/a4.tex
Aug. 2018, with additional "mtex" styling
(/home/m___/.texmf/tex/mtex/eplain.tex)
(/home/m___/.texmf/tex/mtex/ams-math.tex
FONT: AMS math fonts - \mathchardef's prepared, 12 math families preloaded.)
OPmac: etex.src macros detected (/home/m___/.texmf/tex/mtex/opmac-luatex.tex)
(/home/m___/.texmf/tex/mtex/fontfam.tex
(/home/m___/.texmf/tex/mtex/fontfam-global.tex))
(/home/m___/.texmf/tex/mtex/cs-libertine.tex
(/home/m___/.texmf/tex/mtex/ff-mac.tex (/home/m___/.texmf/tex/mtex/luafonts.tex
processing ltluatex.lua (3)
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load module "luaotfload-database.lua".
luaotfload | load : × Error message:
luaotfload | load : × "[string \"-- luatex-core security and io overloads
.......\"]:45: bad argument #1 to 'io_open' (string expected, got nil)".
stack traceback:
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:181: in upvalue 'loadmodule'
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:257: in local 'initialize'
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:307: in field 'main'
[\directlua]:1: in main chunk
+ 1! ~/proj:
基本运行:
1 %\input a4
2 %\input opmac-luafonts
3 %\input luaotfload.sty
4
5 Hello
6
7 \bye
- - - - 和
luatex 对上述文件运行后的终端输出:
: 1! ~/proj: luatex basic-demo
This is LuaTeX, Version 1.10.0 (TeX Live 2019)
restricted system commands enabled.
(./basic-demo [1{/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdft
ex.map}])</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr
10.pfb>
Output written on basic-demo.pdf (1 page, 10337 bytes).
Transcript written on basic-demo.log.
+ 0 ~/proj
笔记:
\input a4 是一个重命名的 opmac.tex 文件,使用 xetex、pdfcsplain、pdftex 运行时没有错误,其他三个引擎也没有出现任何问题。取消注释行“\input luaotfload.sty”而不触及上述最小示例中的其他内容,会引发如上所示的错误。
下面是在最小示例上运行并取消注释“\input luaotfload.sty”后打印的日志文件尾部(全部 48 行):
This is LuaTeX, Version 1.10.0 (TeX Live 2019) (format=luatex 2019.6.5) 10 FEB 2020 13:04
restricted system commands enabled.
**basic-demo
(./basic-demo (/home/m___/.texmf/tex/mtex/luaotfload.sty
(/home/m___/.texmf/tex/mtex/ltluatex.tex
File: ltluatex.tex 2018/10/21 v1.1i LuaTeX support for plain TeX (core)
\e@alloc@attribute@count=\count277
\e@alloc@ccodetable@count=\count278
\e@alloc@luafunction@count=\count279
\e@alloc@whatsit@count=\count280
\e@alloc@bytecode@count=\count281
\e@alloc@luachunk@count=\count282
\catcodetable@initex=\catcodetable1
\catcodetable@string=\catcodetable2
\catcodetable@latex=\catcodetable3
\catcodetable@atletter=\catcodetable4
)
Lua module: luaotfload-main 2020-02-02 3.12 luaotfload entry point
Lua module: luaotfload-init 2020-02-02 3.12 luaotfload submodule / initializatio
n
Lua module: lualibs 2020-02-02 2.70 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2020-02-02 2.70 ConTeXt Lua libraries -- extended c
ollection.
Lua module: luaotfload-log 2020-02-02 3.12 luaotfload submodule / logging
Lua module: luaotfload-parsers 2020-02-02 3.12 luaotfload submodule / filelist
Lua module: luaotfload-configuration 2020-02-02 3.12 luaotfload submodule / conf
ig file reader
luaotfload | conf : Root cache directory is /usr/local/texlive/2019/texmf-var/lu
atex-cache/generic-dev/names.
luaotfload | init : Loading fontloader “fontloader-2020-01-26.lua” from kpse
-resolved path “/home/m___/.texmf/tex/mtex/fontloader-2020-01-26.lua”.
Lua-only attribute luaotfload@state = 1
Lua-only attribute luaotfload@noligature = 2
Lua-only attribute luaotfload@syllabe = 3
luaotfload | init : Context OpenType loader version “3.11”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Lua module: luaotfload-loaders 2020-02-02 3.12 luaotfload submodule / callback h
andling
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua module: luaotfload-database 2020-02-02 3.12 luaotfload submodule / database
Lua module: luaotfload-unicode 2020-02-02 3.12 luaotfload submodule / Unicode he
lpers
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load module "luaotfload-database.lua".
luaotfload | load : × Error message:
luaotfload | load : × "[string \"-- luatex-core security and io overloads .
......\"]:45: bad argument #1 to 'io_open' (string expected, got nil)".
lualatex 终端输出如下:
restricted system commands enabled.
(./latex-example.tex
LaTeX2e <2018-12-01>
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load module "luaotfload-database.lua".
luaotfload | load : × Error message:
luaotfload | load : × "[string \"-- luatex-core security and io overloads .......\"]:45: bad argument #1 to 'io_open' (string expect
ed, got nil)".
堆栈回溯:
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:181: in upvalue 'loadmodule'
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:257: in local 'initialize'
...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:307: in field 'main'
[\directlua]:1: in main chunk
: 1! ~/proj:
lualatex 日志文件的输出:
This is LuaTeX, Version 1.10.0 (TeX Live 2019) (format=lualatex 2019.6.5) 10 FEB 2020 14:36
restricted system commands enabled.
**latex-example.tex
(./latex-example.tex
LaTeX2e <2018-12-01>
Lua module: luaotfload-main 2020-02-02 3.12 luaotfload entry point
Lua module: luaotfload-init 2020-02-02 3.12 luaotfload submodule / initializatio
n
Lua module: lualibs 2020-02-02 2.70 ConTeXt Lua standard libraries.
Lua module: lualibs-extended 2020-02-02 2.70 ConTeXt Lua libraries -- extended c
ollection.
Lua module: luaotfload-log 2020-02-02 3.12 luaotfload submodule / logging
Lua module: luaotfload-parsers 2020-02-02 3.12 luaotfload submodule / filelist
Lua module: luaotfload-configuration 2020-02-02 3.12 luaotfload submodule / conf
ig file reader
luaotfload | conf : Root cache directory is /usr/local/texlive/2019/texmf-var/lu
atex-cache/generic-dev/names.
luaotfload | init : Loading fontloader “fontloader-2020-01-26.lua” from kpse
-resolved path “/home/m___/.texmf/tex/mtex/fontloader-2020-01-26.lua”.
Lua-only attribute luaotfload@state = 2
Lua-only attribute luaotfload@noligature = 3
Lua-only attribute luaotfload@syllabe = 4
luaotfload | init : Context OpenType loader version “3.11”
Inserting `luaotfload.node_processor' at position 1 in `pre_linebreak_filter'.
Inserting `luaotfload.node_processor' at position 1 in `hpack_filter'.
Lua module: luaotfload-loaders 2020-02-02 3.12 luaotfload submodule / callback
handling
Inserting `luaotfload.define_font' at position 1 in `define_font'.
Lua module: luaotfload-database 2020-02-02 3.12 luaotfload submodule / database
Lua module: luaotfload-unicode 2020-02-02 3.12 luaotfload submodule / Unicode he
lpers
luaotfload | load : FATAL ERROR
luaotfload | load : × Failed to load module "luaotfload-database.lua".
luaotfload | load : × Error message:
luaotfload | load : × "[string \"-- luatex-core security and io overloads .
......\"]:45: bad argument #1 to 'io_open' (string expected, got nil)".
tlmgr 输出:
+ 0 ~: tlmgr info "unicode-data"
package: unicode-data
category: Package
shortdesc: Unicode data and loaders for TeX
longdesc: This bundle provides generic access to Unicode Consortium data for TeX use. It contains a set of text files provided by the Unicode Consortium which are currently all from Unicode 8.0.0, with the exception of MathClass.txt which is not currently part of the Unicode Character Database. Accompanying these source data are generic TeX loader files allowing this data to be used as part of TeX runs, in particular in building format files. Currently there are two loader files: one for general character set up and one for initialising XeTeX character classes as has been carried out to date by unicode-letters.tex. The source data are distributed in accordance with the license stipulated by the Unicode Consortium. The bundle as a whole is co-ordinated by the LaTeX3 Project as a general resource for TeX users.
installed: Yes
revision: 52961
sizes: doc: 13k, run: 2681k
relocatable: No
cat-version: 1.11
cat-license: lppl1.3c
cat-topics: latex3 unicode
cat-contact-repository: https://github.com/latex3/unicode-data
collection: collection-basic
+ 0 ~:
---- 结束 tlmgr -----
现有文件:
- 0 ~: ls -la /usr/local/texlive/2019/texmf-dist/tex/generic/unicode-data/CaseFolding.txt 84K -rw-r--r-- 1 m___ m___ 81K 8月 13 日 22:54 /usr/local/texlive/2019/texmf-dist/tex/generic/unicode-data/CaseFolding.txt
- 0〜:
- 0 ~: ls -la /usr/local/texlive/2019/tlpkg/tlpobj/unicode-data.tlpobj 4K -rw-rw-r-- 1 m___ m___ 3K 2月 8 日 13:37 /usr/local/texlive/2019/tlpkg/tlpobj/unicode-data.tlpobj
- 0〜:
--- 结束现有文件 ----
tlmgr:
: 1! ~: /usr/local/texlive/2019/bin/x86_64-linux/tlmgr update tlmgr update: 指定 --list、--all、--self 或软件包名称列表。tlmgr: 发生错误。请参阅上述消息。退出。+ 1! ~: /usr/local/texlive/2019/bin/x86_64-linux/tlmgr update luatex tlmgr: 软件包存储库http://ctan.mirror.ftn.uns.ac.rs/systems/texlive/tlnet(已验证) tlmgr: 将备份保存到 /usr/local/texlive/2019/tlpkg/backups tlmgr: 没有可用的更新 在 /usr/local/texlive/2019/bin/x86_64-linux/tlmgr 第 862 行的标量 chomp 中使用未初始化值 $TEXMFSYSVAR。 在 /usr/local/texlive/2019/bin/x86_64-linux/tlmgr 第 863 行的标量 chomp 中使用未初始化值 $TEXMFSYSCONFIG。 在 /usr/local/texlive/2019/bin/x86_64-linux/tlmgr 第 864 行的标量 chomp 中使用未初始化值 $TEXMFLOCAL。 在/usr/local/texlive/2019/bin/x86_64-linux/tlmgr 第 865 行。在 /usr/local/texlive/2019/bin/x86_64-linux/tlmgr 第 876 行的连接 (.) 或字符串中使用了未初始化的值 $TEXMFDIST。+ 0 ~: