I am trying to use the svg package for LaTeX, which in my case also relies on Inkscape 1.0, to easily include SVG files in my compiled PDF. However, it wants to create all of its outputs in one folder in the working directory called 'svg-inkscape' by default. Is there a way to tell the package to feed Inkscape an output path that matches the input file path?

A sample of my directory looks like this:

├── main.tex
├── Makefile
├── chapter-1
│   ├── figures
│   │   └── figure-1.svg
│   └── chapter-1.tex
└── svg-inkscape
    └── figure-1.pdf         <-- is in another folder than the SVG

My ideal outcome would be to have

├── main.tex
├── Makefile
└── chapter-1
    ├── figures
    │   ├── figure-1.svg
    │   └── figure-1.pdf     <-- sits next to SVG
    └── chapter-1.tex

1 Answer 1


It is, that's what the option inkscapepath is for:

\usepackage[inkscapearea=page, inkscapepath=svgdir]{svg}

In my experience, though, it is a blessing not to have these temporary files clutter the image folder. It avoids confusing messes and enables you to easily delete them all (say you want to re-export all drawings or you want to copy only the necessary files somewhere). If what bugs you is that images from all chapters are in one folder, I would recommend you use svgsubdir instead. This will create a folder named svg-inkscape/ for temporary files in the folder where the svg resides.

\usepackage[inkscapearea=page, inkscapepath=svgsubdir]{svg}
  • Thank you! I had gotten confused by the output setting parameters in the SVG section (B.1.3) of the documentation. Clearly, I should have looked more into the general settings! Commented Jul 1, 2020 at 21:48

You must log in to answer this question.

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