mrpiggi / svg

Handling SVG pictures in LaTeX documents using Inkscape, ImageMagick and/or Ghostscript
Other
65 stars 12 forks source link

add support for opt-in ImageMagick instead of Inkscape #55

Open mrpiggi opened 11 months ago

mrpiggi commented 11 months ago

https://tex.stackexchange.com/questions/696391/

michael-o commented 5 months ago

I strongly support this request, Inkscape has a massive trail of dependencies:

# pkg install inkscape
Updating common repository catalogue...
common repository is up to date.
Updating docgen repository catalogue...
docgen repository is up to date.
All repositories are up to date.
The following 101 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        adwaita-icon-theme: 42.0 [docgen]
        at-spi2-core: 2.50.1 [docgen]
        atkmm: 2.28.0_1 [docgen]
        binutils: 2.40_5,1 [docgen]
        boehm-gc: 8.2.6 [docgen]
        boost-libs: 1.84.0 [docgen]
        cairo: 1.17.4_2,3 [docgen]
        cairomm: 1.12.2_6 [docgen]
        colord: 1.4.7 [docgen]
        cups: 2.4.7_2 [docgen]
        dbus: 1.14.10_4,1 [docgen]
        double-conversion: 3.3.0 [docgen]
        duktape-lib: 2.7.0 [docgen]
        enchant2: 2.2.15_5 [docgen]
        encodings: 1.1.0,1 [docgen]
        fig2dev: 3.2.8a_2 [docgen]
        font-bh-ttf: 1.0.3_5 [docgen]
        font-misc-ethiopic: 1.0.4 [docgen]
        font-misc-meltho: 1.0.3_5 [docgen]
        fribidi: 1.0.13_1 [docgen]
        gcc13: 13.2.0_4 [docgen]
        gdk-pixbuf2: 2.42.10_2 [docgen]
        glib-networking: 2.78.0 [docgen]
        glibmm: 2.66.6,1 [docgen]
        gmp: 6.3.0 [docgen]
        gnutls: 3.7.10_2 [docgen]
        graphite2: 1.3.14 [docgen]
        gsettings-desktop-schemas: 42.0 [docgen]
        gsl: 2.7.1_1 [docgen]
        gtk-update-icon-cache: 3.24.31_1 [docgen]
        gtk3: 3.24.41 [docgen]
        gtkmm30: 3.24.2_4 [docgen]
        gtksourceview4: 4.8.3_2 [docgen]
        harfbuzz: 8.3.0 [docgen]
        hicolor-icon-theme: 0.17 [docgen]
        hunspell: 1.7.2_1 [docgen]
        hwdata: 0.379,1 [docgen]
        icu: 74.2,1 [docgen]
        inkscape: 1.3.2_2 [docgen]
        jasper: 4.2.1 [docgen]
        lib2geom: 1.3_1 [docgen]
        libXcomposite: 0.4.6_1,1 [docgen]
        libXcursor: 1.2.2 [docgen]
        libXdamage: 1.1.6 [docgen]
        libXft: 2.3.7_1 [docgen]
        libXinerama: 1.1.4_3,1 [docgen]
        libXrandr: 1.5.2_1 [docgen]
        libdatrie: 0.2.13_2 [docgen]
        libepoll-shim: 0.0.20230411 [docgen]
        libepoxy: 1.5.9 [docgen]
        libgcrypt: 1.10.3_1 [docgen]
        libglvnd: 1.7.0 [docgen]
        libgpg-error: 1.48 [docgen]
        libgudev: 237 [docgen]
        libgusb: 0.3.10_1 [docgen]
        libidn2: 2.3.7 [docgen]
        libpotrace: 1.16 [docgen]
        libproxy: 0.4.18 [docgen]
        libpsl: 0.21.5 [docgen]
        librsvg2-rust: 2.56.4_5 [docgen]
        libsigc++: 2.12.0 [docgen]
        libsoup: 2.74.3 [docgen]
        libtasn1: 4.19.0_1 [docgen]
        libthai: 0.1.29_1 [docgen]
        libudev-devd: 0.5.2 [docgen]
        libunistring: 1.2 [docgen]
        libxkbcommon: 1.6.0_2 [docgen]
        libxml++: 2.40.1_2,1 [docgen]
        libxslt: 1.1.37_1 [docgen]
        mpc: 1.3.1_1 [docgen]
        mpfr: 4.2.1,1 [docgen]
        netpbm: 11.04.02_1 [docgen]
        nettle: 3.9.1 [docgen]
        openblas: 0.3.25,2 [docgen]
        p11-kit: 0.25.3_1 [docgen]
        pango: 1.50.14 [docgen]
        pangomm: 2.40.1_6 [docgen]
        pixman: 0.42.2 [docgen]
        polkit: 124_2 [docgen]
        py310-appdirs: 1.4.4 [docgen]
        py310-cachecontrol: 0.14.0 [docgen]
        py310-cairo: 1.21.0,1 [docgen]
        py310-cssselect: 1.2.0 [docgen]
        py310-filelock: 3.13.1 [docgen]
        py310-lxml: 4.9.3 [docgen]
        py310-msgpack: 1.0.8 [docgen]
        py310-numpy: 1.25.0_6,1 [docgen]
        py310-scour: 0.38.2 [docgen]
        py310-six: 1.16.0 [docgen]
        py310-typing-extensions: 4.10.0 [docgen]
        shared-mime-info: 2.2_2 [docgen]
        suitesparse-amd: 3.3.1 [docgen]
        suitesparse-camd: 3.3.1 [docgen]
        suitesparse-ccolamd: 3.3.2 [docgen]
        suitesparse-cholmod: 5.2.0 [docgen]
        suitesparse-colamd: 3.3.2 [docgen]
        suitesparse-config: 7.6.1 [docgen]
        suitesparse-umfpack: 6.3.2 [docgen]
        wayland: 1.22.0 [docgen]
        xkeyboard-config: 2.41_4 [docgen]
        xorg-fonts-truetype: 7.7_1 [docgen]

Number of packages to be installed: 101

The process will require 1 GiB more space.
216 MiB to be downloaded.
asmwarrior commented 4 months ago

My guess is that, if ImageMagick is used, it can only convert the whole svg directly to some other format, such as pdf format, but you can't split the image part and text part from the original svg file.

For some reasons, I have need to use the option inkscapelatex=false, see discussion here: Text in svg is not wrapping around a box

mrpiggi commented 4 months ago

My guess is that, if ImageMagick is used, it can only convert the whole svg directly to some other format, such as pdf format, but you can't split the image part and text part from the original svg file.

That's correct. There wouldn't be any support for typesetting text with LaTeX when using ImageMagick. Nevertheless, if this isn't needed, using it instead of Inkscape is a feasible use case.

For some reasons, I have need to use the option inkscapelatex=false, see discussion here: Text in svg is not wrapping around a box

Please, don't hijack issues. And have a look at https://gitlab.com/inkscape/inkscape/issues/2617 regarding your potential wrapping issue.

asmwarrior commented 4 months ago

For some reasons, I have need to use the option inkscapelatex=false, see discussion here: Text in svg is not wrapping around a box

Please, don't hijack issues. And have a look at https://gitlab.com/inkscape/inkscape/issues/2617 regarding your potential wrapping issue.

OK, thanks for the info.

BTW: I have created a tutorial about how to use svg inside latex under windows with the texstudio about 3 years ago, see here:

https://github.com/asmwarrior/LatexImportSVGTutorial