# [Tex/LaTex] Asymptote SVG export as vectors, instead of rendered. How

asymptotesvgvector

TL;DR : my question is in bold below.

Preamble: I'm pretty new to Latex. Been fiddling around with both MikTex and TexLive for a few days. Have got a working setup on Windows (with ghostscript, Image Magick, WinEdt9, TexLive, asymptote, asypictureB).

Using PDFTeXify from WinEdt, with an added -shell-escape command line parameter, I can produce a correct PDF from this (great looking) example. (This example is actually the reason I'm diving into Latex at all)

I'm trying to get the above asymptote script exported as SVG.

If I set settings.outformat = "svg"; in the .tex file (twice), it does produce an svg, but with rendered contents (About 120 external png files arranged by the svg). I want it to be pure vector (like in the PDF). How do I do that?

To produce SVG output, you will need dvisvgm (version 0.8.7 or later) from http://dvisvgm.sourceforge.net and must use the latex or tex tex engine. You might need to adjust the configuration variable libgs to point to the location of your Ghostscript library libgs.so (or to an empty string, depending on how dvisvgm was configured).

I checked, and it seems all my dependencies are okay.

Sidenote: if I do settings.outformat = "eps"; , I do get a *-sphere.eps and a *-cilinder.eps, but not an end result of the two eps files combined. Those eps files are indeed pure vector. I could combine these manually and convert them to svg. Needless to say, I want it in one go.