Comments (11)
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.
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.
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.
Thank you :)
from svg.
Thanks for the report. I will adapt package svg
as soon as I find some time for this...
from svg.
from svg.
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.
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.
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.
v2.02f was shipped to CTAN
from svg.
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)
- Including some files from matplotlib fails, commandline works HOT 2
- Importing SVG doesn't work on Windows when the filename contains German special characters
- No helpful error message when inkscape conversion fails HOT 5
- Rendering twice removes the output HOT 1
- \includesvg in Beamer causing wrong figure placement HOT 6
- Bug color/colour of text not correct HOT 2
- Inkscape conversion command deprecated for Inkscape 1.2.2 (2022-12-09) HOT 5
- SVG extracted using `svg-extract` looks different from the original SVG HOT 4
- `svg` package takes the bounding box of the original SVG as opposed to the bounding box resulting from the text conversion HOT 2
- Exporting selected layers HOT 3
- Including two files by the same name results in duplication of the first file HOT 1
- Call inkscape --shell with batches of files for faster processing HOT 4
- Handling for package `svg-extract` only options is flawed when used with package `svg` instead
- TeXstudio autocomplete is not supported by svg package HOT 6
- add support for opt-in ImageMagick instead of Inkscape HOT 4
- Compilation fails for specific images
- Text Reference Displays Section Number Instead of Figure Number with \ref HOT 1
- svg-extract incompatibility with filecontents HOT 1
- includesvg incompatible with setkeys{Gin} HOT 16
- Enhanced support for pandoc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg.