带有 lualatex 和 otf 字体的 Asymptote

带有 lualatex 和 otf 字体的 Asymptote

考虑以下简单asymptote文件:

import settings;
import three;

settings.tex = 'lualatex';
settings.outformat = 'pdf';

texpreamble("\usepackage{luatex85}
\usepackage[math-style = TeX]{unicode-math}");

draw('$x$', O -- X);
draw('$y$', O -- Y);
draw('$z$', O -- Z);

asy崩溃。以下是经过稍微编辑的输出asy -vv t.asy

Using configuration directory /home/christophe/.asy
Using history /home/christophe/.asy/history
Welcome to Asymptote version 2.38
cd /tmp
Processing t
Loading plain from /usr/share/asymptote/plain.asy
[...]
lualatex \scrollmode
lualatex -output-format=dvi \nonstopmode\input t_.tex
This is LuaTeX, Version 0.95.0 (TeX Live 2016) 
 restricted system commands enabled.
LaTeX2e <2016/03/31> patch level 3
Babel <3.9r> and hyphenation patterns for 1 language(s) loaded.

(./t_.tex (/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2016/texmf-dist/tex/generic/luatex85/luatex85.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/unicode-math/unicode-math.sty
(/usr/local/texlive/2016/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3kernel/l3dvips.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/ucharcat/ucharcat.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
 (/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.sty
(/usr/local/texlive/2016/texmf-dist/tex/luatex/luaotfload/luaotfload.sty(using 
write cache: /home/christophe/.texlive2016/texmf-var/luatex-cache/generic)(usin
g read cache: /usr/local/texlive/2016/texmf-var/luatex-cache/generic /home/chri
stophe/.texlive2016/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.090 seconds)
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec-luatex.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2enc.def)
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2lmr.fd)(compiling luc: /
usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regul
ar.luc)(load luc: /home/christophe/.texlive2016/texmf-var/luatex-cache/generic/
fonts/otl/lmroman10-regular.luc))(compiling luc: /usr/local/texlive/2016/texmf-
var/luatex-cache/generic/fonts/otl/lmroman12-regular.luc)(load luc: /home/chris
tophe/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman12-regular.l
uc) (/usr/local/texlive/2016/texmf-dist/tex/xelatex/xunicode/xunicode.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3enc.def(compiling luc: /us
r/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmromanslant12-re
gular.luc)(load luc: /home/christophe/.texlive2016/texmf-var/luatex-cache/gener
ic/fonts/otl/lmromanslant12-regular.luc)(compiling luc: /usr/local/texlive/2016
/texmf-var/luatex-cache/generic/fonts/otl/lmroman12-italic.luc)(load luc: /home
/christophe/.texlive2016/texmf-var/luatex-cache/generic/fonts/otl/lmroman12-ita
lic.luc)(compiling luc: /usr/local/texlive/2016/texmf-var/luatex-cache/generic/
fonts/otl/lmroman12-bold.luc)(load luc: /home/christophe/.texlive2016/texmf-var
/luatex-cache/generic/fonts/otl/lmroman12-bold.luc)
(/usr/local/texlive/2016/texmf-dist/tex/latex/euenc/eu2lmss.fd)(compiling luc: 
/usr/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/lmsans12-regul
ar.luc)(load luc: /home/christophe/.texlive2016/texmf-var/luatex-cache/generic/
fonts/otl/lmsans12-regular.luc))
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2016/texmf-dist/tex/latex/graphics-def/dvips.def))))
(/usr/local/texlive/2016/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/ts1enc.def))
(/usr/local/texlive/2016/texmf-dist/tex/latex/filehook/filehook.sty)
(/usr/local/texlive/2016/texmf-dist/tex/latex/unicode-math/unicode-math-luatex.
sty
(/usr/local/texlive/2016/texmf-dist/tex/lualatex/lualatex-math/lualatex-math.st
y (/usr/local/texlive/2016/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2016/texmf-dist/tex/latex/unicode-math/unicode-math-table.t
ex)))
No file t_.aux.
(/usr/local/texlive/2016/texmf-dist/tex/latex/tipa/t3cmr.fd)(compiling luc: /us
r/local/texlive/2016/texmf-var/luatex-cache/generic/fonts/otl/latinmodern-math.
luc)(load luc: /home/christophe/.texlive2016/texmf-var/luatex-cache/generic/fon
ts/otl/latinmodern-math.luc) [1] [2] [3] (./t_.aux))
 401 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 7 glue, 4 attribute, 45 glue_spec, 4 attribute_lis
t, 1 write nodes
   avail lists: 1:1,2:31,3:8,4:2,5:10,6:2,7:22,8:1,9:6
Output written on t_.dvi (3 pages, 2408 bytes).
Transcript written on t_.log.
dvips -R -Pdownload35 -D600 -q -ot_.ps t_.dvi
kpathsea:make_tex: Invalid fontname `[latinmodern-math]:mode=base;script=math;language=DFLT;', contains '['
dvips: Font [latinmodern-math]:mode=base;script=math;language=DFLT; not found; using cmr10
dvips: ! invalid char 119909 from font [latinmodern-math]:mode=base;script=math;language=DFLT;
gs -q -dBATCH -P -dSAFER -sDEVICE=eps2write -sOutputFile=/dev/null t_.ps
GPL Ghostscript 9.20: Unrecoverable error, exit code 1

我必须使用 Ctrl-C 停止该过程。这似乎与字体有关。这是、、、otf的错误吗?有什么解决方法吗?asymptoteluatexdvipsfontspec

答案1

感谢 John Bowman,这个问题现在在渐近线源代码中已修复

顺便说一句,这\usepackage{luatex85}似乎不再是强制性的了。

相关内容