Closed jfab20 closed 9 months ago
After trying to run the command dvisvgm -n -v3 --optimize -o test.svg test_.dvi
manually, I found out that the --optimize
flag is the problem. When running the command without it, everything works out as expected. Is this a known problem?
If your version of dvisvgm doesn't support the --optimize flag, it is too old. Also make sure you are running the latest git version of Asymptote, which includes this work around:
Author: John Bowman <bowman@ualberta.ca>
Date: Sat Jul 29 23:25:54 2023 -0600
Fix bug 388: Avoid broken dvisvgm reassign-clippaths optimization.
diff --git a/picture.cc b/picture.cc
index dea28b54..1b28ee5a 100644
--- a/picture.cc
+++ b/picture.cc
@@ -462,7 +462,7 @@ string dvisvgmCommand(mem::vector<string>& cmd, const string& outname)
string libgs=getSetting<string>("libgs");
if(!libgs.empty())
cmd.push_back("--libgs="+libgs);
- cmd.push_back("--optimize");
+ cmd.push_back("--optimize=collapse-groups,group-attributes,remove-clippaths,simplify-text,simplify-transform");
push_split(cmd,getSetting<string>("dvisvgmOptions"));
string outfile=stripDir(outname);
if(!outfile.empty())
If your version of dvisvgm doesn't support the --optimize flag, it is too old. Also make sure you are running the latest git version of Asymptote, which includes this work around:
I have version 3.1.1 of dvisvgm, which is the latest version as far as I'm aware of. Version 2.86-3 of asymptote.
It works with dvisvgm 3.1 but you still need commit aa9f81bad9478bfe8b2ab5fc5376c19c6c79c708 The latest git development version is 2.87-4.
I'm on Arch Linux 6.5.4-arch2-1 and I have the latest versions of asymptote and dvisvgm.
I cannot compile asymptote code to output to svg. I have a minimal file
in my
test.asy
file and when I compile it usingasy test.asy
I get the following error:I have tried reinstalling dvisvgm, texlive and asymptote. When I change
svg
topdf
everything works as expected, and I get a pdf file with a square in it.Whenever I run
asy test.asy
with svg output format I get a bunch of files created in the same directory liketest_.aux, test_.dvi
and with other extensions like.tex, .eps
.I have also created a
.asy/config.asy
file and added the lineswith no effect. What can I do?