I'm trying to include some PDF I saved in Inkscape and change the width and the height at the same time. Is this possible? I tried \svgheight and it did not take both values at the same time.

This is what I do


In the past I had the option of doing this:


(setting both the width and the height).

How do I do this now?

  • Is illustration.pdf_tex a PDF file or a TeX source document? If it's a PDF, you should be able to include it using \includegraphics if you correct the suffix to .pdf.
    – Jake
    Mar 1, 2012 at 5:22
  • @Jake, the question refers to the pdf + TeX output from inkscape which does give a pdf_tex extension.
    – gontadu
    May 1, 2012 at 21:41
  • There is an added option in Inkscape 0.91: "Output page size". You could select "use exported object's size" rather than "Use document's page size".
    – Sony
    Feb 13, 2015 at 1:21

2 Answers 2


Will this be useful?


Using \begin{center} gives extra vertical space. It is advisable to use \centering

May be this article is useful.


From Inkscape you can export your diagram as tikz code. you have to install inkscape2tikz extension from here. Once installed, figures can be exported as tikz code (Extensions->Export->Export to TikZ path). Say you save the exported file as figure.tex. Now, in your latex main file you have to include this:

\caption{Caption of the figure} \label{fig:myfigure}

You have to put figure.tex and your main latex file in the same folder or full path to figure.tex has to be specified like \input{C:/figure-files/figure.tex}. I always go by this method.

There is another way where you can export the figure as .pdf file (not as .pdf_tex) (file->save as->figure.pdf). Then you can include it like:

\caption{Caption of the figure}

But here if you change the font of the document, fonts in figure won't match properly. Also it is better to keep the aspect ratio. This is done by mentioning only width or height of the figure.


It seems like you checked the "PDF+LaTeX: Omit text in PDF, and create LaTeX file" option when exporting the file:

enter image description here

This creates two files: .pdf and .pdf_tex. The former is the non-text image in PDF form, while the latter contains the necessary image inclusion and text-related content, which should be rendered from within LaTeX. The problem is that the image inclusion looks like this:

    \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}
     % <other text stuff>

Apart from some other nasty stuff, it defines \svgwidth if you don't define it. However, as is evident from the \includegraphics code, it only provides a width adjustment. Hence your problem with \svgheight not working.

Here are my suggestions:

  • If you're interested in scaling the image proportionally, only set \svgwidth;
  • If you don't have any text that requires conversion from Inkscape to LaTeX, export to .pdf without the "PDF+LaTeX: Omit text in PDF, and create LaTeX file" option checked. That way you can include the image as usual via \includegraphics[width=<wd>,height=<ht>]{<file>}; or
  • Include the image using

      \newsavebox{\myimage}% Box that will store image
        \input{tex.pdf_tex}% Actual image and text
      \resizebox{3.8in}{3in}{\usebox{\myimage}}% Resize box
      % <caption> <label>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .