includesvg, absurdly large image margin
up vote
0
down vote
favorite
I am trying to include an SVG image into my document which had always (kind of) seemed to work when using includesvg
. But now I have an image that I created from a postscript file, modified in Inkscape (saved as plain svg), which is not centered at all when included using:
begin{figure}
centering
includesvg{resources/svg/an-image}
end{figure}
When I run everything through pdflatex
, the left border of the image is positioned in the center of the page, most of the right part is cut off and if I add a caption it is placed way below the images lower border. It looks as if the image had a very large empty margin (which it definitely does not have in the SVG file).
Unfortunately the image itself is confidential so I cannot share it here.
What might be the cause of this? Might there be a workaround using another command than includesvg
(that one has caused me unnecessary trouble before)?
pdftex svg
add a comment |
up vote
0
down vote
favorite
I am trying to include an SVG image into my document which had always (kind of) seemed to work when using includesvg
. But now I have an image that I created from a postscript file, modified in Inkscape (saved as plain svg), which is not centered at all when included using:
begin{figure}
centering
includesvg{resources/svg/an-image}
end{figure}
When I run everything through pdflatex
, the left border of the image is positioned in the center of the page, most of the right part is cut off and if I add a caption it is placed way below the images lower border. It looks as if the image had a very large empty margin (which it definitely does not have in the SVG file).
Unfortunately the image itself is confidential so I cannot share it here.
What might be the cause of this? Might there be a workaround using another command than includesvg
(that one has caused me unnecessary trouble before)?
pdftex svg
1
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
1
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image withincludesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.
– Peter
Jun 21 at 15:44
I believe there is little advantage in exporting a modified postscript as.svg
as opposed to, say, PDF if you only want to include it in a.tex
document.
– moewe
Jun 21 at 15:49
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to include an SVG image into my document which had always (kind of) seemed to work when using includesvg
. But now I have an image that I created from a postscript file, modified in Inkscape (saved as plain svg), which is not centered at all when included using:
begin{figure}
centering
includesvg{resources/svg/an-image}
end{figure}
When I run everything through pdflatex
, the left border of the image is positioned in the center of the page, most of the right part is cut off and if I add a caption it is placed way below the images lower border. It looks as if the image had a very large empty margin (which it definitely does not have in the SVG file).
Unfortunately the image itself is confidential so I cannot share it here.
What might be the cause of this? Might there be a workaround using another command than includesvg
(that one has caused me unnecessary trouble before)?
pdftex svg
I am trying to include an SVG image into my document which had always (kind of) seemed to work when using includesvg
. But now I have an image that I created from a postscript file, modified in Inkscape (saved as plain svg), which is not centered at all when included using:
begin{figure}
centering
includesvg{resources/svg/an-image}
end{figure}
When I run everything through pdflatex
, the left border of the image is positioned in the center of the page, most of the right part is cut off and if I add a caption it is placed way below the images lower border. It looks as if the image had a very large empty margin (which it definitely does not have in the SVG file).
Unfortunately the image itself is confidential so I cannot share it here.
What might be the cause of this? Might there be a workaround using another command than includesvg
(that one has caused me unnecessary trouble before)?
pdftex svg
pdftex svg
edited Jun 21 at 15:31
nox
3,367421
3,367421
asked Jun 21 at 14:52
Peter
1273
1273
1
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
1
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image withincludesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.
– Peter
Jun 21 at 15:44
I believe there is little advantage in exporting a modified postscript as.svg
as opposed to, say, PDF if you only want to include it in a.tex
document.
– moewe
Jun 21 at 15:49
add a comment |
1
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
1
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image withincludesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.
– Peter
Jun 21 at 15:44
I believe there is little advantage in exporting a modified postscript as.svg
as opposed to, say, PDF if you only want to include it in a.tex
document.
– moewe
Jun 21 at 15:49
1
1
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
1
1
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image with
includesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.– Peter
Jun 21 at 15:44
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image with
includesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.– Peter
Jun 21 at 15:44
I believe there is little advantage in exporting a modified postscript as
.svg
as opposed to, say, PDF if you only want to include it in a .tex
document.– moewe
Jun 21 at 15:49
I believe there is little advantage in exporting a modified postscript as
.svg
as opposed to, say, PDF if you only want to include it in a .tex
document.– moewe
Jun 21 at 15:49
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
You may have invisible objects that extend outside of the SVG's viewBox (inksacpe's page). Have a look at the inkscapearea
option. Possible values are
drawing
/nocrop
(default) : adjust SVG viewbox to fit all elements.
page
/nocrop
: respect SVG viewBox.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
You may have invisible objects that extend outside of the SVG's viewBox (inksacpe's page). Have a look at the inkscapearea
option. Possible values are
drawing
/nocrop
(default) : adjust SVG viewbox to fit all elements.
page
/nocrop
: respect SVG viewBox.
add a comment |
up vote
0
down vote
You may have invisible objects that extend outside of the SVG's viewBox (inksacpe's page). Have a look at the inkscapearea
option. Possible values are
drawing
/nocrop
(default) : adjust SVG viewbox to fit all elements.
page
/nocrop
: respect SVG viewBox.
add a comment |
up vote
0
down vote
up vote
0
down vote
You may have invisible objects that extend outside of the SVG's viewBox (inksacpe's page). Have a look at the inkscapearea
option. Possible values are
drawing
/nocrop
(default) : adjust SVG viewbox to fit all elements.
page
/nocrop
: respect SVG viewBox.
You may have invisible objects that extend outside of the SVG's viewBox (inksacpe's page). Have a look at the inkscapearea
option. Possible values are
drawing
/nocrop
(default) : adjust SVG viewbox to fit all elements.
page
/nocrop
: respect SVG viewBox.
answered Jun 22 at 7:59
NicolaF_
212
212
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f437404%2fincludesvg-absurdly-large-image-margin%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Can you copy the .svg file, replace everything confidential with one large rectangle and if this also produces the error, share the svg file for us to test?
– samcarter
Jun 21 at 15:00
if you work with Inkscape, yo just save a copy in pdf format and import it using graphicx package like in this post
– J Leon V.
Jun 21 at 15:00
1
After some inspection I believe the problem probably lies with inkscape, the apparent image size after including the image with
includesvg
approximately matches the pagesize in Inkscape before resizing to the actual content's dimensions. I will just do as suggested and use another file format for now.– Peter
Jun 21 at 15:44
I believe there is little advantage in exporting a modified postscript as
.svg
as opposed to, say, PDF if you only want to include it in a.tex
document.– moewe
Jun 21 at 15:49