Comments (5)
from svg.
The CLI of Inkscape was dicussed some time ago (#20). At this time --export-type
was dropped completely. Apparently, it was brought back again. Nevertheless, inkscape --help
as well as Inkscape man page both state (if --export-type
is omitted)
file type is guessed from extension if present
the file type to export will be inferred from the extension of the specified filename
What do you get, typing inkscape -V
on your terminal? Maybe the link in PATH
is pointing to another installation? With
svg.sty 2020/11/26 v2.02k (include SVG pictures)
Inkscape 1.2.2 (732a01da63, 2022-12-09)
calling inkscape "my-svg-example.svg" -D --export-dpi=300 --export-filename="my-svg-example_svg-raw.png"
works exactly as expected and creates the desired png file.
\begin{filecontents}[noheader]{my-svg-example.svg}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<text>Package svg: \LaTeX</text>
</g>
</svg>
\end{filecontents}
\listfiles
\documentclass{article}
\usepackage{svg}
\begin{document}
\includesvg[inkscapeformat=png]{my-svg-example.svg}
\end{document}
from svg.
Thanks for your fast replies.
> inkscape -V
This is what I get, the same version I wrote earlier.
Inkscape 1.2.2 (732a01da63, 2022-12-09)
I made some changes yesterday as well. Right now I have this as my path variable:
C:\Program Files\Inkscape\bin
In the log, I now find that it does not recognize Inkscape even though it is found using cmd.
(|'inkscape' -V )
Package svg Warning: No version of Inkscape was detected by invoking
(svg) `inkscape -V'
(svg) so the Inkscape export will fail quite sure as the
(svg) command is probably unknown to your OS. You could set
(svg) `inkscapeversion=<version>' manually but this is very
(svg) unlikely to work on input line 172.
and then
Package svg Info: Calling Inkscape on input line 244.
runsystem(inkscape "./svg/my.svg" -D --export-dpi=300 --export-filename="my_svg
-raw.png")...executed.
runsystem(inkscape "./svg/my.svg" -D --export-dpi=300 \relax --without-gui --ex
port-png="my_svg-raw.png")...executed.
as well as
Package svg Error: Inkscape version not dete
cted.
See the svg package documentation for explanation.
Type H <return> for immediate help.
...
l.244 \includesvg{./svg/my}
It was tried to invoke `inkscape'
for file "./svg/my.svg"
but no result was produced. Check the log file
and set `inkscapeversion=<version>' manually.
runsystem(inkscape "./svg/my.svg" -D --export-dpi=300 --export-filename="my_svg
-raw.png")...executed.
Package svg Warning: The export with Inkscape failed for file
(svg) `./svg/my.svg'
(svg) Troubleshooting: Please check in the log file how
(svg) the invocation of Inkscape took place and try to
(svg) execute it yourself in the terminal on input line 244.
I guess I now have an issue with the Inkscape installation...
I did a fresh installation, loading the newest version again from the web to make sure I don't have a corrupted installer.
Also, I still use the same path for the system variables Path.
C:\Program Files\Inkscape\bin
Running the command
inkscape "./svg/my.svg" -D --export-dpi=300 --export-filename="./svg/my-svg.png"
Again, it works in cmd and not in Latex...
Using the actual command as logged in the log file:
inkscape "./svg/my.svg" -D --export-dpi=300 --export-filename="my_svg-raw.png"
The file is successfully created using the console, but not when running it via pdfLatex.
However, the file is not created in the source file folder svg but rather in the folder, which the command is executed from. Might this be an issue?
from svg.
That's a tricky one. Package svg
tries to detect the version of Inkscape by parsing the output of inkscape -V
. In order to get this from stdout
it needs to invoke \@@input|"'inkscape' -V "
and this might be an problem. So maybe setting \svgsetup{inkscapeversion=1}
in the preamble would help. Another solution could be to set the absolute path to Inkscape with \svgsetup{inkscapeexe="C:\Program Files\Inkscape\bin\inkscape.exe"}
(try both variants with or without quotes).
However, the file is not created in the source file folder svg but rather in the folder, which the command is executed from.
Package svg
creates the desired file in the root folder of your tex file and moves it to the destination folder afterwards for several reasons. Mainly because on some systems, you can't run the inkscape export right in the desired output folder due to write restrictions. So this isn't the problem.
from svg.
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
- 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.