I am looking for a way to include svg image into the LaTeX. I know there are some discussion on this topic before and I think LaTeX just don't support SVG directly. I read few posts here and people suggest to use Inkscape to edit the svg and save it as LaTeX-pdf-svg then use command \includesvg to insert the image. But since I have too many svg created before and it is no way for me to edit them one by one with Inkscape. I am looking for other workaround (I mean still keep it as scalable vector image supported by LaTeX). The first way I can think of is to convert the svg with imagemagick to eps, which can be done with script. However, I don't know why, the converted eps is all black and all detail are gone. So besides imagemagick, any free code do you recommend to convert svg to eps in Linux? or do you have any other suggestion on inserting svg to LaTeX?

p.s. The system is opened to a group of people and they can generate and upload their SVG. So before I insert all those images into LaTeX, I have to convert them into LaTeX-supporting format. But the server doesn't have inkscape installed, I am looking for other converter.

  • 4
    You can convert svg to pdf using inkscape's command line (therefore, no need to edit them one by one). – Aditya Jan 21 '13 at 6:33
  • I appreciate your suggestion. I will take this as final option because my system is open to a group of people and they can created they images in svg and jpg. I cannot force them to have svg converted to other format before they uploaded to the server. And I just check the server, there is no inkscape installed, they only provide imagemagick but it is not good in converting scalable vector image from one format to other :( – user1285419 Jan 21 '13 at 6:37
  • @user1285419: Are you using the old latex (DVI mode) or the modern pdflatex (direct PDF output)? The latter doesn't support EPS but PDF for images. Also, ImageMagick might be able to convert SVG to PDF as long Ghostscript is installed, too. – Martin Scharrer Jan 21 '13 at 7:11
  • hi Martin, I am using texlive 2009 and pdflatex to generate PDF directly. I try imagemagick (with ghostscript installed) to convert svg to pdf. It looks just ok but it seems that the pdf generated was not scalable vector image. I see the raster when I zoom the pdf in. I am wondering if it is due to the imagemagick or it is common to all kind of conversion program to lose the scalable feature while converting svg to eps/pdf. But if there is no better way, I probably will go with this scheme. – user1285419 Jan 21 '13 at 7:18
  • 3
    There is svg package which does this. – user11232 Jan 21 '13 at 8:05

Browse other questions tagged or ask your own question.