l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
April 21: Google Glass
Next Installfest:
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2005 Mar 01 21:17

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] xfig export for latex (was inkscape)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Here's my take on Henry's question.  I use two ways.  Either way, you
first need to create the xfig document.  When you use the text tool, use
the LaTeX font, and enable the "special" attribute.  The special attribute
allows all text to be processed as LaTeX code, so text like "\frac{5}{10}"
will be processed as a 5/10 fraction when the PS file is generated, even
though you'll see "\frac{5}{10}" within Xfig.

Then when you export, this is the easy way:

   Export as eepic macros, and name the file "file.tex".  Then in the
   LaTeX document,

      % maybe you also need "color", I don't remember.

   do that and you'll be able to include xfig figures within your LaTeX

The drawback here is that you're limited to what eepic macros can do,
which basically means you're restricted to various types of lines and
three shades of gray.  To be more elaborate, you can export in "PS with

   1. Export the file as "file.ps".  This will create two files,
      "file.ps" and "file.ps_t".

   2. Rename "file.ps_t" to "file.tex".

   3. Then in the LaTeX document,

      % maybe you also need "eepic" and "color", I don't remember.

If you use pdflatex instead of latex->dvi->dvips, then you can do the same
except you export it as "PDF with LaTeX."


On Tue, 1 Mar 2005, Jonathan Stickel wrote:

> 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
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

Mark K. Kim
AIM: markus kimius
Homepage: http://www.cbreak.org/
Xanga: http://www.xanga.com/vindaci
Friendster: http://www.friendster.com/user.php?uid=13046
PGP key fingerprint: 7324 BACA 53AD E504 A76E  5167 6822 94F0 F298 5DCE
PGP key available on the homepage
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.