[OS X TeX] Installing textext for Inkscape on OS X

Ramón M. Figueroa-Centeno ramonf at hawaii.edu
Sat Oct 11 13:18:14 EDT 2008


The following instructions allow for the insertion of editable LaTeX
equations in Inkscape (a powerful open source vector graphics editor).

Here are the things that I had to do to get textext working with Inkscape on
my computer running OS X 10.5.5 (I believe some might reflect bugs in

1. Download Inkscape from <http://www.inkscape.org/download/> and install
it. I got Inkscape-0.46-2.LEOPARD.UNIVERSAL.dmg. You also might need to
update X11.app by downloading and installing the latest Xquartz from
<http://xquartz.macosforge.org/trac/wiki>. I would run Inkscape at least
once to make sure it does work.

2. Download textext from
<http://www.elisanet.fi/ptvirtan/software/textext/>. I got version 0.4.4.

3. Install pstoedit-bin and pstoedit-shlibs from Fink
<http://www.finkproject.org/> (this takes several hours as it compiles every
dependence). I am not sure if both are needed. Version 3.45-1 was installed.

4. Install MacTeX from <http://www.tug.org/mactex/>. I am using the
MacTeX-2008 distribution.

5. Comment/delete in textext.py the lines:

if 'plot-svg' not in out:
   raise RuntimeError("Pstoedit not compiled with plot-svg support")

Apparently the script does not detect that pstoedit does have plot-svg
support. Indeed, when I run the command "pstoedit -help | grep svg" in the
Terminal I get

pstoedit: version 3.45 / DLL interface 108 (build Oct 10 2008 - release
build - g++ 4.0.1 (Apple Inc. build 5484)) : Copyright (C) 1993 - 2007
Wolfgang Glunz
    plot-svg:        .svg:    svg  via GNU libplot

6. In textext.py replace

exec_command(['pdflatex', self.tmp('tex')] + latexOpts)


exec_command(['/usr/texbin/pdflatex', self.tmp('tex')] + latexOpts)

Apparently, even though pdflatex is in the $PATH environmental variable
textext.py needs the full path.

7. Place textext.inx and textext.py inside the application bundle. This is
done by right-clicking on Inkscape.app on the Finder and selecting "Show
Package contents" and there going to Contents/Resources/extensions/
When putting it in ~/.inkscape/extensions/ it does not work.

8. Remove "libpng12.0.dylib" from Contents/Resources/lib/ inside the
Inkscape application bundle. The version included is not new enough for
pstoedit. I believe that its role will be taken by the "libpng12.0.dylib"
installed by Fink in /sw/lib/ or already in the system in /usr/X11/lib/.

If successful you will have a "TeX Text" item in the "Effects" menu in
Inkscape, which you can use to insert/edit LaTeX into your open document.

I gleaned these instructions from the Inkscape forum:


I am writing them down here as I had difficulty following the back and forth
in the forum thread.




Ramón M. Figueroa-Centeno, Ph.D.
Associate Professor

Mathematics Department
University of Hawaii at Hilo
College Hall 4-A
200 W. Kawili St.
Hilo, HI 96720-4091

(808) 974-7387 (office)
(808) 933-3473 (fax)


PGP/GnuPG Public Key at http://www2.hawaii.edu/~ramonf/ramonf.gpgkey

More information about the MacOSX-TeX mailing list