-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Certain parts removed from circuitikz image #139
Comments
The missing graphics objects are a result of internal changes introduced in Ghostscript 9.52. Some PDF drawing operators are no longer accessible by external applications like dvisvgm and therefore can't be redefined. Unfortunately, there isn't much I can do about it. If you replace GS 9.52 (or later) with GS 9.50, dvisvgm should produce correct results. You could also use |
Thanks for the prompt reply. That's unfortunate about Ghostscript. Is the intention to continue to provide PDF conversion with limited support, or is there some hope of a workaround eventually? If anyone else comes across this and wants an alternative to the two options listed above (I had trouble reverting to GS 9.50 and experienced bugs unrelated to dvisvgm when using standalone with luatex to produce a DVI file), I found that inkscape seems to do a good job of converting PDF to SVG. I haven't tested this thoroughly, but I've had good luck so far with
|
I'll have a look if there's a way to work around this specific issue but can't promise yet that it's technically possible. I plan to keep the limited PDF support as long as possible. Unfortunately, each of the recent Ghostscript releases introduced further restrictions because of security reasons. If at some point future restrictions limit the functionality of dvisvgm too much, I'll possibly have to drop PDF support. You might want to have a look at |
Thanks for the pointer, I'll take a look at |
I've added a patch that should work around the issue. At least, it leads to correct results for the two examples above when using dvisvgm with GS 9.52. |
I draw circuit schematics with circuitikz. I've recently noticed that some of the output is being removed when dvisvgm converts the pdf to an svg file. For example, here is a minimal input tex file:
mwe.tex:
When I compile this with pdflatex:
I get the expected output:
However, when I subsequently convert this to an svg with
the circle at the bottom is dropped:
This is not a cropping issue, since the circle can be in the middle of the image and still be dropped.
I've tried to make this example as minimal as possible. However, I understand circuitikz/tikz are doing a lot under the hood, so please let me know if I can clarify anything.
I'm using dvisvgm 2.9.1 and circuitkz 1.2.2.
Here's another example:
pdf:
svg:
Does dvisvgm omit certain layers from the output? My initial guess is that circuitkz is drawing the missing elements on another layer.
The text was updated successfully, but these errors were encountered: