Go to page:

Search help:

Navigation

Groups

LyX documentation

Edit

Shared groups

Links

UsingLyXWithTgif

Please categorize this page.
<< Additional software | Page list | Use Inkscape SVG Images >>

Tips for using LyX with Tgif....

Description

Tgif is an interactive drawing tool that allows the user to draw and manipulate objects in the X Window system. It is "similar" to the xfig program but has a seemingly unusual user interface that may somewhat puzzle beginners. Tgif can also be used on Windows but you need to install Cygwin.

Like in xfig, you can insert LaTeX equations in images but, unlike xfig, you can see the final result directly in the image being edited. This means that you can have an idea of the space occupied by the equation without the need to postprocess it.

The interesting bit is that tgif allows using LyX for editing equations. By default it uses ps2epsi for generating an encapsulated postscript (eps) file with an embedded bitmap preview used by tgif itself for displaying the final result. Here you find a .sym (symbol) file adapted from the one distributed with tgif that instead uses epstool for embedding a bitmap preview, a couple of Bourne shell scripts, and a C program to be used only with certain versions of epstool.

Files

Here is a list of the relevant files with some explanation:

  • eq4-lyx-epstool.sym - This is the symbol file to be placed in one of the tgif domains (collection of library symbols). You can use the .Xdefaults file to specify a path where tgif should look for symbol files. Here are some lines you can put in .Xdefaults to this end:
    Tgif.MaxDomains: 1
    Tgif.DomainPath0: LaTeX:.:/home/<your login id>/.tgif/latex:/usr/X11R6/lib/X11/tgif
    Tgif.DefaultDomain: 0
    
The Tgif.DomainPath0 specifies both the name of the domain (the first string before the first ':' symbol) and a list of directories where symbol files are to be searched (the rest of the string after the first ':' symbol) in the same format as the PATH environment variable.
  • tgif-lyx - This a script invoked by the symbol file to edit an equation. It must be in the PATH such that tgif can locate it. In its current form it is suited to Cygwin. You must edit it to adjust the path to the lyx executable and, if you are not using it on Cygwin, you must change the definition of the CYGWIN_ROOT variable as CYGWIN_ROOT="".
  • tgif-epstool - This a script invoked by the symbol file to embed a bitmap preview in an eps file. It must be in the PATH such that tgif can locate it. In its current form it is suited to Cygwin. You must edit it to adjust the path to the epstool executable and, if you are not using it on Cygwin, you must change the definition of the CYGWIN_ROOT variable as CYGWIN_ROOT="".
  • ps2eps.diff - This is a patch to be applied to the ps2eps perl script. You need to apply this patch only if you are using Cygwin.
  • tgif-fixepsi.c - Some epstool versions produce an embedded bitmap which shows on tgif with inverted colors. If your epstool produces inverted colors, you should compile and put in the PATH this small C program. You also need to uncomment the last line in the tgif-epstool script (remove the '#' character at the beginning of the line).

Contributors

  • Enrico Forestieri
  • Ed Gatzke
Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2006-07-19 17:59 CEST