[vox-tech] xfig export for latex (was inkscape)

Jonathan Stickel jjstickel at sbcglobal.net
Tue Mar 1 14:37:30 PST 2005


Henry House wrote:
> På tisdag, 01 mars 2005, skrev Jonathan Stickel:
<snip>
>>I just installed inkscape to check it out.  It looks really nice; more 
>>inuitive editing than xfig.  However, I primarily make vector drawings 
>>to import into latex documents.  Xfig supports that very well, including 
>>ways to include latex math.
> 
> 
> I doubt that you will find LaTeX integration potential of that quality in
> Inkscape, alas.
> 
> I'm curious, how do you produce a diagram that TeX can process? (I assume
> that by the above you mean that you are exporting your drawings into
> something that can be inserted directly into LaTeX, versus plain old
> EPS that is embedded by reference and inserted at printing time by DVIPS.)
> I've never gotten it work, probably because I am not using the right
> combination of packages in LaTeX and export format in xfig (there are eight
> export formats that appear to be LaTeX-related).
> 

There are many ways to go about this:

1) You can just export a eps/pdf and include that directly, but this is 
not convenient if you want to process latex math in the figure.  You can 
"replace" text in the figure with the 'psfrag' package, but I found that 
cumbersome.  This is probably the best (only?) option if you want to use 
inkscape.

2) You can export ps/pdf with the text separate in a latex file 
("combined ps/latex").  Then you input the latex file in your document, 
which has its own includegraphics command.  This works fairly well, 
except that I like to have standalone pdfs I can look at.

3) What I've started doing recently is using a script called fig2ps 
(also includes fig2pdf and fig2eps): 
http://sourceforge.net/projects/fig2ps/.  This processes your fig file, 
translates any latex text, and creates a standalone eps/pdf.  This I 
include in my latex document as usual.

BTW, I used to use latex->dvipdfm (rather than dvips), but now I use 
pdflatex exclusively.

Jonathan


More information about the vox-tech mailing list