6

Consider the following simple asymptote file:

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 crashes. Here is an slightly edited output of 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

I have to stop the process with Ctrl-C. This seems to be related with otf fonts. Is this a bug of asymptote, luatex, dvips, fontspec? Any idea for a workaround?

  • As far as I can see, Asymptote uses DVI output anyway, then dvips and Ghostscript for conversion to PDF. Unfortunately, dvips cannot deal with OpenType fonts. – egreg Jan 23 '17 at 22:57
  • If I remove the call to unicode-math, I get Output written on jorasy_.dvi (3 pages, 4920 bytes) at the end of the LuaLaTeX run. – egreg Jan 23 '17 at 23:01
  • @egreg I created a ticket at asymptote bug tracker. Thanks for investigating. – cjorssen Jan 24 '17 at 9:05
3

Thanks to John Bowman, the issue is now fixed in asymptote source code.

By the way, the \usepackage{luatex85} does not seem to be mandatory anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.