I would like to compile the following using the command sequence:
lualatex document.tex
asy document-1.asy
lualatex document.tex
However, this fails with the message:
! error: (file "document-1".pdf) (pdf backend): cannot find image file '"document-1".pdf'
! ==> Fatal error occurred, no output PDF file produced!
If I replace lualatex
with pdflatex
or xelatex
the code works just fine. This is with mactex 2017. The test doc is the following:
\documentclass{article}
\usepackage{graphicx}
\usepackage{asymptote}
\begin{document}
Hello.
I like to make pics with Asymptote like this one:
\begin{figure}[h]
\begin{asy}
include graph;
size(1inch);
filldraw(circle((0,0),1),yellow,black);
fill(circle((-.3,.4),.1),black);
fill(circle((.3,.4),.1),black);
draw(arc((0,0),.5,-140,-40));
\end{asy}
\end{figure}
\par It makes me happy,
since I can still type my normal LaTeX stuff around it:
\(\int_0^{\pi}{\sin{x}}\,dx=2\)
\end{document}
My question is: how can I make this work with lualatex (which I am using for my main document)?
asymptote
package tells the TeX engine to look at"document-1".pdf
(literally with quotes), and LuaTeX does just that (it doesn't strip them like the other two engines). So, if you domv document-1.pdf \"document-1\".pdf
after theasy
run, you'll get the desired result. I don't know which program is to blame though. – Sergei Golovan Jun 23 '17 at 3:42asymptote
package writers should adapt the package. – balcinus Jun 23 '17 at 6:57