#### Hybrid View

1. A Carafe of Ubuntu
Join Date
Aug 2006
Beans
82
Distro
Ubuntu 10.04 Lucid Lynx

## LaTeX and SVG

I'd like to include SVG graphics in LaTeX documents easily. The setup that I'm using right now, is to create the images in Inkscape, then convert them to TikZ code, and add it to the .tex file. This is, however, far from optimal. The code is huge, and I don't get some details (like arrow ends) converted correctly. I've tried converting to .eps and .png, but both turn out with very poor quality, even if I raise the resolution to 600dpi when exporting. Any ideas on how to have good quality graphics that are relatively small?

2. Grande Half-n-Half Cinnamon Ubuntu
Join Date
Aug 2007
Beans
876
Distro
Ubuntu 16.04 Xenial Xerus

## Re: LaTeX and SVG

This is weird. I use .eps all the time when exporting from Inkscape and haven't experienced any poor quality. The vector graphics are preserved just fine. Although, I find Adobe Reader doing far better job with the graphics in general, have you attempted to look at the compiled, I suppose .pdf, using Adobe Reader?

Another approach for you, if you can use pdflatex is to export into .pdf, or convert into .pdf. Both approaches should work.

3. First Cup of Ubuntu
Join Date
Nov 2009
Location
Europe
Beans
3
Distro
Ubuntu 10.04 Lucid Lynx

## Re: LaTeX and SVG

For my thesis, I used to export the figures from Inkscape as eps and than convert them into pdf using "epstopdf". Afterwards, I used pdflatex to create the documents. It worked fine for me. The figures were pretty small and good quality.

4. Ubuntu addict and loving it
Join Date
Jan 2008
Location
Auckland, New Zealand
Beans
3,132
Distro
Ubuntu 9.10 Karmic Koala

## Re: LaTeX and SVG

You can export directly to PDF from Inkscape. That's what I do and it works really well.

I use epstopdf with plots from Gnuplot though.

5. A Carafe of Ubuntu
Join Date
Aug 2006
Beans
82
Distro
Ubuntu 10.04 Lucid Lynx

## Re: LaTeX and SVG

How do I include those pdf images in my tex file?

These are my files, so you can compare them. The grafico2.svg is the original Inkscape one. The grafico2.pdf is the one exported at 300dpi from Inkscape. The file grafico2.eps, was also exported from Inskcape at 300dpi. And grafico2tex.pdf is the pdf generated by pdflatex using TikZ. The best one i thought was grafico2.pdf, but I don't know how to include it in my file.

Thanks for the help!

6. Grande Half-n-Half Cinnamon Ubuntu
Join Date
Aug 2007
Beans
876
Distro
Ubuntu 16.04 Xenial Xerus

## Re: LaTeX and SVG

You really should preserve the vector graphics and not rasterize it (i.e. in this case export -> picking resolution), that will ruin everything. Use Inkscape's "Save a Copy" or "Save As" functions.

You can include the .eps or .pdf figs in your .tex by the standard graphics environment
Code:
\begin{figure}
\includegraphics[width = \textwidth]{grafico2.eps} % Or .pdf
\caption{Some histogram thingie}
\label{fig:hist}
\end{figure}

7. First Cup of Ubuntu
Join Date
May 2013
Beans
1

## Re: LaTeX and SVG

Hi
when opened .eps file in inkscape the appearence of the total figure is changing, particularly fonts and symbols in figures. please suggest what could be the reason, how solve it.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•