Giter VIP home page Giter VIP logo

Comments (11)

mrpiggi avatar mrpiggi commented on May 26, 2024 3

I actually did some development for v2.03 and fixed it with #8 but currently I do not have time to go on with development. I will see, what I can do. Maybe I will provide a little patch for v2.02

For now, you can use this workaround

\usepackage{svg}
\makeatletter
\ifdefined\svg@ink@ver\else
  \def\svg@ink@ver{1}% change version to 0 if necessary
  \renewcommand*\svg@ink@cmd[2]{%
    \svg@ink@exe\space"#1.\svg@file@ext"\space%
    --without-gui\space\svg@ink@area\space%
    \ifx\svg@ink@dpi\relax\else--export-dpi=\svg@ink@dpi\space\fi%
    \if@svg@ink@latex--export-latex\space\fi%
    \ifx\svg@ink@opt\@empty\else\svg@ink@opt\space\fi%
    \ifnum\svg@ink@ver<\@ne%
      --export-\svg@ink@format="#2.\svg@ink@format"\space%
    \else%
      --export-type=\svg@ink@format\space%
      --export-file="#2.\svg@ink@format"\space%
    \fi%
  }%
\fi
\makeatother

from svg.

fstengel avatar fstengel commented on May 26, 2024 3

Inkscape 1.0rc1 changed things a bit (again). No more --without-gui and --export-file becomes --export-filename. So the patch becomes:

\usepackage{svg}
\makeatletter
\ifdefined\svg@ink@ver\else
  \def\svg@ink@ver{1}% change version to 0 if necessary
  \renewcommand*\svg@ink@cmd[2]{%
    \svg@ink@exe\space"#1.\svg@file@ext"\space%
    \svg@ink@area\space%
    \ifx\svg@ink@dpi\relax\else--export-dpi=\svg@ink@dpi\space\fi%
    \if@svg@ink@latex--export-latex\space\fi%
    \ifx\svg@ink@opt\@empty\else\svg@ink@opt\space\fi%
    \ifnum\svg@ink@ver<\@ne%
      --export-\svg@ink@format="#2.\svg@ink@format"\space%
    \else%
      --export-type=\svg@ink@format\space%
      --export-filename="#2.\svg@ink@format"\space%
    \fi%
  }%
\fi
\makeatother

Thanks again for that precious tool

from svg.

theScrabi avatar theScrabi commented on May 26, 2024 1

Apperently what they want one to use in the future are actions:
https://wiki.inkscape.org/wiki/index.php?title=Using_the_Command_Line#Via_actions

from svg.

theScrabi avatar theScrabi commented on May 26, 2024

Thank you :)

from svg.

mrpiggi avatar mrpiggi commented on May 26, 2024

Thanks for the report. I will adapt package svg as soon as I find some time for this...

from svg.

fstengel avatar fstengel commented on May 26, 2024

from svg.

jvasile avatar jvasile commented on May 26, 2024

I and @kfogel ran into this bug and it looks like inkscape is fairly sanguine about breaking 3rd party tools. This is, after all, a major version release.

Once 1.0 ships and the interface settles, the challenge will be supporting both old and new CLI interfaces. The right answer might be to ship a wrapper script, call that, and have it call inkscape with the correct parameters. We had just started to think about what that might look like when we came here to see who else had encountered the bug and what solutions exist.

Thanks, @mrpiggi and @fstengel for the workarounds.

We've incorporated the workaround as a plugin into our Latex / Jinja templating system. It detects when the workaround is needed and adds it to your latex doc via jinja templating at build time. Thanks again.

from svg.

jendrikw avatar jendrikw commented on May 26, 2024

For detecting the version, inkscape recommends calling inkscape --without-gui (or inkscape -z) and checking the exit code, but I'm not sure how you can do that in latex.

https://gitlab.com/inkscape/inbox/-/issues/2416

from svg.

mrpiggi avatar mrpiggi commented on May 26, 2024

Detecting version in LaTeX: https://github.com/mrpiggi/svg/blob/develop/source/svg.dtx#L4138

I already did something about this some time ago. I am going to provide a bug fix release until the end of this week.

from svg.

mrpiggi avatar mrpiggi commented on May 26, 2024

v2.02f was shipped to CTAN

from svg.

mrpiggi avatar mrpiggi commented on May 26, 2024

Inkscape 1.0rc1 changed things a bit (again). No more --without-gui and --export-file becomes --export-filename.

As well as --export-type is implied by the file extension of --export-filename

from svg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.