3

This is my MWE:

\documentclass{minimal}

\usepackage[inline]{asymptote}

\begin{document}

Test.

\begin{asydef}
  usepackage("bm");
  texpreamble("\def\V#1{\bm{#1}}");
\end{asydef}

2d figure:

\begin{asy}
  size(10cm);
  draw(circle((1,0), 1.5), blue);
  draw(ellipse((1,0), 1.5, 0.5));
\end{asy}

3D figure:

\begin{asy}
  settings.output = "pdf";
  settings.prc = false;
  size(5cm,0);
  draw(unitcircle);
  import three;
  draw(unitsphere);
\end{asy}

\end{document}

If I comment out the second \begin{asy} ... \end{asy} part, my code is successfully compiled.

If I uncomment it, I get

Package asymptote Warning: file `main-2.tex' not found on input line 31.

In my real document (not the MWE above), the error I get is

/usr/share/texlive/texmf-dist/tex/latex/media9/media9.sty:75:
media9 error: "su pport outdated"
!
! Support package l3kernel too old.
!
! See the media9 documentation for further information.
!
! For immediate help type H <return>
!...............................................

Here's a Read&Edit link to my MWE:

https://www.overleaf.com/4761541czcjsg

3
  • 2
    Overleaf's TeX Live 2015 (Ubuntu wily) doesn't have compatible versions of media9 and latex3, unfortunately -- that means media9 and asymptote 3D objects won't work.
    – imnothere
    Mar 31, 2016 at 23:32
  • 1
    Additional note: the effect of settings.prc = false; is precisely to disable the creation of 3d prc objects. Also, settings.output should be settings.outformat. Apr 1, 2016 at 2:28
  • 1
    btw, Overleaf is planning to upgrade TL2015 in Ubuntu soon, so that should help with media9 and latex3 compatibility when it happens.
    – imnothere
    Apr 1, 2016 at 12:27

1 Answer 1

5

(Sorry for the late update here + disclaimer: I'm a support personnel at Overleaf.)

Asymptote 3D now works on Overleaf after the upgrade to TeX Live 2016. An example has been posted at https://www.overleaf.com/latex/examples/asymptote-3d-graphics/dkkcmszqzvcy .

1
  • when I use import gsl; the asymptote on overleaf does not work. I guess some modules including gsl have not intergrated into Overleaf so far
    – Black Mild
    Sep 26, 2021 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .