View previous topic :: View next topic |
Author |
Message |
dice Guru
Joined: 21 Apr 2002 Posts: 577
|
Posted: Fri Mar 18, 2005 2:43 am Post subject: SVG in LaTeX? |
|
|
Is it possible to get LaTeX to recognize my SVG drawings? I'm writing a paper and doing figures in Inkscape, normally I just export the SVG to EPS and use epstopdf and pdflatex; however this time I have a particuarly complicated figure that I used some transparencies in, and when I export to EPS the transparent bits become opaque. I've tried messing with the figure and exporting it to PNG but it looks pixelated in the PDF, I'd really rather keep it as a vector drawing if at all possible.
Here's the LaTeX source I tried using to include the SVG drawing:
Code: | \begin{figure}
\centering
\includegraphics{euler-angles.svg}
\caption{Euler angles \label{fig:euler-angles}}
\end{figure} |
And the error from pdflatex:
Code: | ! LaTeX Error: Unknown graphics extension: .svg.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.32 \includegraphics[angle=270]{euler-angles.svg}
?
! Emergency stop.
|
Does anyone have any experience with this? |
|
Back to top |
|
|
blurp Tux's lil' helper
Joined: 21 Oct 2004 Posts: 102
|
Posted: Fri Mar 18, 2005 3:23 am Post subject: |
|
|
how about using gimp to export to eps or png? |
|
Back to top |
|
|
dice Guru
Joined: 21 Apr 2002 Posts: 577
|
Posted: Fri Mar 18, 2005 5:35 am Post subject: |
|
|
blurp wrote: | how about using gimp to export to eps or png? |
gimp rasterizes the file when you open it, I can save to a PNG but it's very pixelated when I embed it into the PDF. I could probably bump up the DPI when gimp rasterizes the image and end up with something that'll be fine for print, but I'd rather keep everything as vector graphics to keep it simple and scalable. |
|
Back to top |
|
|
arthurtech n00b
Joined: 04 Feb 2004 Posts: 57 Location: Nottingham, UK
|
Posted: Tue Mar 22, 2005 5:46 pm Post subject: |
|
|
That's exactly what I'm trying to do. I'd be happy if I could find a reliable SVG to EPS converter - trying anything modern in LaTeX always seems to go badly :-(
I've been drawing in Sodipodi, but had similar trouble with the EPS export. I'm emerging Inkscape now to see if anything has improved. |
|
Back to top |
|
|
blurp Tux's lil' helper
Joined: 21 Oct 2004 Posts: 102
|
|
Back to top |
|
|
arthurtech n00b
Joined: 04 Feb 2004 Posts: 57 Location: Nottingham, UK
|
Posted: Wed Mar 23, 2005 10:27 am Post subject: |
|
|
Hi blurp,
Thanks for the link. I had a quick look at Batik, but didn't get too far with it (mainly through lack of effort on my part). Never tried Scribus.
I've done quite well with Inkscape. Version 0.40 and below have a bizarre quirk where the EPS file exported is rotated through 90 degrees, but this has been fixed in 0.41. See the following thread for an ebuild:
https://forums.gentoo.org/viewtopic-t-299531-highlight-inkscape.html
The quality of the EPS is fine - Inkscape appear to be quite an active project, so I guess they're fixing things fast. |
|
Back to top |
|
|
bork_bigjoe n00b
Joined: 28 Mar 2005 Posts: 57 Location: Caltech
|
Posted: Tue May 03, 2005 6:01 am Post subject: |
|
|
Just wanted to second the recommendation of Inkscape v 0.41. I had been using SodiPodi and bumbling through a high-res raster output aimed to give presentable results at a fixed output size. Inkscape was able to flawlessly load my SVG files and export them as EPS that worked beautifully with latex (using regular latex to produce a DVI, then dvipdf to produce my output). My SVG files were not terribly complex, so YMMV.
One thing I found necessary was to uncheck the "convert fonts to paths" option when exporting -- it made the fonts look like junk. |
|
Back to top |
|
|
arthurtech n00b
Joined: 04 Feb 2004 Posts: 57 Location: Nottingham, UK
|
Posted: Tue May 03, 2005 9:35 am Post subject: |
|
|
Yeah, I'm stil using Inkscape for converting SVG to EPS, and it seems to do that very well. The problem I've found is actually drawing anything with Inkscape - it still seems very buggy. I've reverted to Sodipodi for drawing and Inkscape for file conversion ~~ |
|
Back to top |
|
|
bork_bigjoe n00b
Joined: 28 Mar 2005 Posts: 57 Location: Caltech
|
Posted: Tue May 03, 2005 9:09 pm Post subject: |
|
|
I haven't tried drawing with Inkscape, but I find Sodipodi pretty decent. The interface is a bit awkward and I don't like the line drawing tools much at all, especially when trying to draw a block diagram -- I haven't figured out how to anchor lines to other objects or to each other. However, it's at least stable and I can work around these limitations for the most part. |
|
Back to top |
|
|
|