# [vox-tech] Rant: LaTeX graphics programs

Jonathan Stickel jjstickel at sbcglobal.net
Fri Apr 29 17:20:42 PDT 2005

Peter Jay Salzman wrote:
<snip>
>
> Sure thing, but I have to warn you -- these aren't the most complicated
> diagrams in the world.  That's partially why I got used to writing my own
> picture environment stuff (and after using it for so long, I've become fast
> at it.)  It was always faster to DYI than to figure out xfig's atrocious
> interface.
>
> Here's three documents that should show a nice cross section of the type of
> stuff I'd like to do with graphics programs (all this stuff except for
> damped.ps were done by hand.  The damped.ps document was done with xfig
> (Jon and Mark, thank you for converting me.)
>
> http://www.dirac.org/damped.ps
> http://www.dirac.org/eddy.ps
> http://www.dirac.org/Green-Functions.ps
>
> If you have any suggestions, I'd definitely be appreciative.
>
> One of my problems with xfig and dia is that I haven't figured out how to
> put mathematics in my diagrams.  Something like:
>
>    \put(50,65){$\vec{F} = \fder{p}{t}$}
>
> which would be trivial when drawing my own diagrams.  I suppose I could
> insert it in the .eepic file that xfig generates, but the whole point is to
> try to do this in a wysiwyg manner.
>
> Even if it means just clicking on the screen to open up a box and type the
> equation myself (which is what I'd prefer --- I'm light years faster doing
> typeset math than any human being can be using a lyx/MS Word equation
> editor.)
>

I only see a figure in damped.ps (using gv); looks nice.

Anyway, the ability to put latex typeset labels on my figures is
precisely the reason I use xfig and not some other program (like
Inkscape).  Again, there are a few different ways to proceed.  My
current method is to type latex commands in text boxes in my xfig
figure.  I make sure to choose "latex fonts" (not postscript fonts;
there is a box to choose), and I have the "special" flag checked.  This
part is in the manual:

http://www.xfig.org/userman/frm_miscellaneous.html

As the manual suggests, you can then export this as ps/latex, both
parts.  I used to do that.  Instead, I now use the program "fig2ps"
found here:

http://sourceforge.net/projects/fig2ps/

This converts the fig file directly to ps/eps/pdf with all latex
commands processed beautifully!  You can even use a latex header file
with personal commands defined, e.g. I redefine the /vec command.  It's
not quite wysiwyg; the latex commands often take up more space than the
final text output, so sometimes it takes a little trial and error to get
correct placement.  Still, it works great for me.

Jonathan

P.S.  I can send examples offlist if you like (I've never setup a
website of my own :().