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

2005-03-01 Thread Mark K. Kim
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,

  \usepackage{eepic}
  % maybe you also need "color", I don't remember.
  ...
  \input{file}

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

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
LaTeX":

   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,

  \usepackage{graphicx}
  % maybe you also need "eepic" and "color", I don't remember.
  ...
  \input{file}

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

-Mark


On Tue, 1 Mar 2005, Jonathan Stickel wrote:

> Henry House wrote:
> > På tisdag, 01 mars 2005, skrev Jonathan Stickel:
> 
> >>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
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech


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

2005-03-01 Thread Jonathan Stickel
Henry House wrote:
På tisdag, 01 mars 2005, skrev Jonathan Stickel:

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