Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SVG in LaTeX?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dice
Guru
Guru


Joined: 21 Apr 2002
Posts: 577

PostPosted: Fri Mar 18, 2005 2:43 am    Post subject: SVG in LaTeX? Reply with quote

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
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Mar 18, 2005 3:23 am    Post subject: Reply with quote

how about using gimp to export to eps or png?
Back to top
View user's profile Send private message
dice
Guru
Guru


Joined: 21 Apr 2002
Posts: 577

PostPosted: Fri Mar 18, 2005 5:35 am    Post subject: Reply with quote

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
View user's profile Send private message
arthurtech
n00b
n00b


Joined: 04 Feb 2004
Posts: 57
Location: Nottingham, UK

PostPosted: Tue Mar 22, 2005 5:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Wed Mar 23, 2005 4:18 am    Post subject: Reply with quote

http://www.tug.org/pipermail/pdftex/2004-November/005419.html

I've not tried this, but check out (2) and (3)...
Back to top
View user's profile Send private message
arthurtech
n00b
n00b


Joined: 04 Feb 2004
Posts: 57
Location: Nottingham, UK

PostPosted: Wed Mar 23, 2005 10:27 am    Post subject: Reply with quote

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
View user's profile Send private message
bork_bigjoe
n00b
n00b


Joined: 28 Mar 2005
Posts: 57
Location: Caltech

PostPosted: Tue May 03, 2005 6:01 am    Post subject: Reply with quote

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
View user's profile Send private message
arthurtech
n00b
n00b


Joined: 04 Feb 2004
Posts: 57
Location: Nottingham, UK

PostPosted: Tue May 03, 2005 9:35 am    Post subject: Reply with quote

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
View user's profile Send private message
bork_bigjoe
n00b
n00b


Joined: 28 Mar 2005
Posts: 57
Location: Caltech

PostPosted: Tue May 03, 2005 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum