TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to include figures generated by inkscape which include transparency. When I change the width of the figures, things get weird.

Have you ever noticed this and is there a better way to do?

% This code works fine
\usepackage{graphicx, xcolor}




enter image description here

% This code doesn't
\usepackage{graphicx, xcolor}




enter image description here

Here is a link to the files generated by inkscape.

Here is the TeX file created by inkscape.

%% Creator: Inkscape inkscape 0.48.2, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'test.pdf' (pdf, eps, ps)
%% To include the image in your LaTeX document, write
%%   \input{<filename>.pdf_tex}
%%  instead of
%%   \includegraphics{<filename>.pdf}
%% To scale the image, write
%%   \def\svgwidth{<desired width>}
%%   \input{<filename>.pdf_tex}
%%  instead of
%%   \includegraphics[width=<desired width>]{<filename>.pdf}
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%%   \usepackage{import}
%% in the preamble, and then including the image with
%%   \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%%   \graphicspath{{<path to file>/}}
%% For more information, please see info/svg-inkscape on CTAN:
%%   http://tug.ctan.org/tex-archive/info/svg-inkscape
    \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
    \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
      \setlength{\unitlength}{\unitlength * \real{\svgscale}}%
    \put(0.47641909,0.6172474){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$p\in M$}}}%
share|improve this question
I generally just save the image as a .pdf in Inkscape and use \includegraphics{} and have had no issues. Is there a reason why you would want to do it this other way? – MaxGraves Oct 21 '13 at 13:42
If you want your text in the figure to have the same font as elsewhere, you should use this method. I think in my case the problem comes the transparency. – Colas Oct 21 '13 at 13:44
I tried it with the provided files and for me it works perfectly. – bene Oct 21 '13 at 14:35
@bene Did you try also with \def\svgwidth{6cm} uncommented? – Colas Oct 21 '13 at 14:46
of course, have a look here: uni-ulm.de/~pqa62/tex/inkscape_test.pdf But I'm wondering, why is there so much space around the figure exported from inkscape? Is it necessary? When I save my figures, I always tell Inkscape only to save the objects without a surrounding frame – bene Oct 21 '13 at 14:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.