[luatex] lualatex and asymptote

Vladimir Lomov lomov.vl at gmail.com
Sat Oct 19 03:45:19 CEST 2013


Hello,
** Arocho, Jesus [2013-10-18 09:38:29 -0400]:

> When using lualatex and asymptote I get the error message: Package
> pdftex.def Error: File '"xxx".pdf' not found.  This occurs in both
> Windows TeXnicCenter (MikTex) and in a Linux kubuntu install.  Both
> installs have up to date versions.  Pdflatex works fine on both
> installs.

First, you don't provide information about version of asymptote, MikTeX,
and TeX Live (usually default TeX distribution on Linux).
Second, you don't provide minimal (un-)working example.
And, third, you use wrong mailing list.

Checked below on TeX Live 2013 on Archlinux x86_64.

1. Asymptote has ability to use different tex engines for typesetting,
   for example,
     asy -tex pdflatex fig1.asy
     asy -tex xelatex fig1.asy
   though this don't work:
     asy -tex lualatex fig1.asy
   Ask asymptote developers to provide support for lualatex/luatex.

   fig1.asy:
   -------------------------- 8< --------------------------
   size(100);

   draw((0,0)--(1,0)--(1,1));
   label(Label("$A$",align=SW),(0,0));
   dot((0,0));
   -------------------------- 8< --------------------------
2. Asymptote code can be embedded into LaTeX document, example

   ex-fig1.ltx:
   -------------------------- 8< --------------------------
   \documentclass{minimal}

   \usepackage{asymptote}

   \begin{document}

   \begin{center}
     \begin{asy}
       size(100);
       draw((0,0)--(0,1)--(1,1));
       label(Label("$B$",align=S),(0,1));
       dot((0,1));
     \end{asy}
   \end{center}

   \end{document}
   -------------------------- 8< --------------------------

   The code must be "tangled" (extracted) from the document, any LaTeX
   engine can be used:
     pdflatex ex-fig1.ltx
     xelatex ex-fig1.ltx
     lualatex ex-fig1.ltx
   Then the asymptote code, located in file 'ex-fig1-1.asy' has to be
   run by asy:
     asy ex-fig1-1.asy
   and after that the document must be processed by some LaTeX engine
     pdflatex ex-fig1.ltx
     xelatex ex-fig1.ltx
     lualatex ex-fig1.ltx
   It is here where lualatex fails miserably, in my case it prints on
   screen:
     ! Package pdftex.def Error: File `"ex-fig1-1".pdf' not found.
   (this is vital part of message), while for pdflatex and xelatex I see
   on screen (part of message), for pdflatex:
      <"ex-fig1-1".pdf, id=1, 100.375pt x 95.6132pt> <use "ex-fig1-1".pdf>
      [1 <./ex-fig1-1.pdf
   for xelatex:
      <use  ""ex-fig1-1".pdf" >

So the problem is on Asymptote side, it uses quotes to, hm, quote
filename. In part this is a problem with luatex (engine), because it
treats quotes differently (this is just a guess, according to message
from pdftex.def).

Ask Asymptote developers to check how asymptote works with luatex or
provide a patch for them.

---
WBR, Vladimir Lomov

-- 
Software entities are more complex for their size than perhaps any other human
construct because no two parts are alike.  If they are, we make the two
similar parts into a subroutine -- open or closed.  In this respect, software
systems differ profoundly from computers, buildings, or automobiles, where
repeated elements abound.
- Fred Brooks, Jr.


More information about the luatex mailing list