Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

SVG in LaTeX?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
dice
Guru
Guru
User avatar
Posts: 577
Joined: Sun Apr 21, 2002 5:30 am

SVG in LaTeX?

  • Quote

Post by dice » Fri Mar 18, 2005 2:43 am

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: Select all

\begin{figure}
\centering
\includegraphics{euler-angles.svg}
\caption{Euler angles \label{fig:euler-angles}}
\end{figure}
And the error from pdflatex:

Code: Select all

! 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?
Top
blurp
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Thu Oct 21, 2004 5:19 am

  • Quote

Post by blurp » Fri Mar 18, 2005 3:23 am

how about using gimp to export to eps or png?
Top
dice
Guru
Guru
User avatar
Posts: 577
Joined: Sun Apr 21, 2002 5:30 am

  • Quote

Post by dice » Fri Mar 18, 2005 5:35 am

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.
Top
arthurtech
n00b
n00b
Posts: 57
Joined: Wed Feb 04, 2004 5:18 pm
Location: Nottingham, UK

  • Quote

Post by arthurtech » Tue Mar 22, 2005 5:46 pm

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.
Top
blurp
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Thu Oct 21, 2004 5:19 am

  • Quote

Post by blurp » Wed Mar 23, 2005 4:18 am

http://www.tug.org/pipermail/pdftex/200 ... 05419.html

I've not tried this, but check out (2) and (3)...
Top
arthurtech
n00b
n00b
Posts: 57
Joined: Wed Feb 04, 2004 5:18 pm
Location: Nottingham, UK

  • Quote

Post by arthurtech » Wed Mar 23, 2005 10:27 am

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:

http://forums.gentoo.org/viewtopic-t-29 ... scape.html

The quality of the EPS is fine - Inkscape appear to be quite an active project, so I guess they're fixing things fast.
Top
bork_bigjoe
n00b
n00b
Posts: 57
Joined: Mon Mar 28, 2005 7:34 am
Location: Caltech
Contact:
Contact bork_bigjoe
Website

  • Quote

Post by bork_bigjoe » Tue May 03, 2005 6:01 am

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.
Top
arthurtech
n00b
n00b
Posts: 57
Joined: Wed Feb 04, 2004 5:18 pm
Location: Nottingham, UK

  • Quote

Post by arthurtech » Tue May 03, 2005 9:35 am

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 ~~
Top
bork_bigjoe
n00b
n00b
Posts: 57
Joined: Mon Mar 28, 2005 7:34 am
Location: Caltech
Contact:
Contact bork_bigjoe
Website

  • Quote

Post by bork_bigjoe » Tue May 03, 2005 9:09 pm

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.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic