vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
555 stars 92 forks source link

Opacity issue in asymptote #276

Closed AsyUser closed 2 years ago

AsyUser commented 2 years ago

I am using Asymptote 2.70 (with gs 9.54.0). Opacity is working fine when using pdf as output format, but it is completely ignored when using asymptote inline in my latex code.

Here's a minimal latex code:

\documentclass{article} \usepackage[inline]{asymptote} \begin{document} \begin{asy} //settings.outformat="pdf"; unitsize(1cm); fill(unitcircle, red+opacity(.5)); fill(shift((.5,0))*unitcircle, blue+opacity(.5)); \end{asy} \end{document}

If I uncomment the command settings.outformat="pdf", then everything is fine, the generated pdf file (I am using pdflatex) has the correct transparency. But with this command commented, opacity settings are completely ignored.

In case this is relevant, I am using linux (opensuse tumbleweed).

johncbowman commented 2 years ago

There are two issues: first of all, don't use gs9.54; it is broken. Fortunately that bug was fixed in version 9.55. Second, you will need to install the latest git version or else wait for the upcoming 2.71 release.

AsyUser commented 2 years ago

Thanks for the info!