textext
Inkscape is a great program. But if you try to make a conference poster with it, you'll see that what is missing is this:
Namely, scientific typesetting.
Some solutions, such as Inklatex, have been written, but generally these do not allow editing the generated objects afterwards. Textext aims to cover this need, by adding re-editable LaTeX objects to Inkscape's repertoire.
Usage
To create a new LaTeX object, choose Effects -> Tex Text, and type in your LaTeX code. The dialog has two additional fields:
- Preamble file: name of a LaTeX preamble file, where you can put common definitions.
- Scale factor: this affects how much a newly created LaTeX object is magnified. You can later change/reset this via Object -> Transform -> Matrix.
Afterwards, the object can be re-edited by selecting it and choosing Effects -> Tex Text again.
Note
For Inkscape versions earlier than 0.46, Inkscape's user interface freezes while you are editing the LaTeX object. This is a limitation of the Inkscape extension model. (If you know better, please inform me how it should be done ;)
Files
Releases:
- textext-0.4.4.exe, textext-0.4.4.tar.gz: Fix bugs in pstoedit detection. (Only relevant for old Pstoedit versions).
- textext-0.4.3.exe, textext-0.4.3.tar.gz: Fix the "inserted items are invisible" problem. Remember previous scale and preamble settings.
- textext-0.4.2.exe, textext-0.4.2.tar.gz: lxml 2.0 compatibility, and restore textext namespace to what it was in Textext 0.3.3. NOTE: You'll need to replace http://www.iki.fi/pav/software/textext with http://www.iki.fi/pav/software/textext/ in any SVG files created with Textext 0.4 or 0.4.1 to edit old text objects with Textext >= 0.4.2 or < 0.4. Sorry about this breakage.
- textext-0.4.1.tar.gz: Fix a pstoedit issue on Ubuntu (see #55273).
- textext-0.4.exe, textext-0.4.zip, textext-0.4.tar.gz: Fix PyXML issues (by porting to lxml). GUI improvements. Fix SVG element id issues when using Pdf2svg. New Windows installer. Requires Inkscape 0.46. (And installing the python-lxml library on Linux.)
- textext-0.3.4.tar.gz: Fix bugs in pstoedit detection. (Only relevant for old Pstoedit versions).
- textext-0.3.3.zip, textext-0.3.3.tar.gz: Minor fix: fix broken python2.4 compatibility.
- textext-0.3.2.zip, textext-0.3.2.tar.gz: Minor fix: require pstoedit != 3.44 only on Ubuntu.
- textext-0.3.1.zip, textext-0.3.1.tar.gz: Inkscape 0.46 compatibility. Bugfixes (don't try to resolve external entities). Initial work on Windows compatibility.
- textext-0.3.tar.gz: Add support for pdf2svg. Special thanks to Robert Szalai!
- textext-0.2.1.tar.gz: Fix bugs in XML importing.
- textext-0.2.tar.gz: Drop the Skencil dependency, and put the extra attributes to the textext namespace.
- textext-0.1.1.tar.gz: Work around bugs in some versions of skconvert on non-Anglic systems
- textext-0.1.tar.gz: First release
For the adventurous:
- http://bitbucket.org/pv/textext/raw/tip/textext.py : Development version. (Find your textext.py, and replace it with this one to try it out.)
For developers:
- Mercurial repository: Development repository
Bugs and enhancements
You can report bugs and other issues, and suggest enhancements in Textext issue tracker:
Before reporting, please check if the issue you see is already listed. Also, please always provide the following information:
- Exact steps to reproduce the problem you are seeing.
- What does Textext currently do?
- What did you expect it to do?
- Are you using Windows, Linux, or Mac?
- Which versions of Inkscape and Textext you have?
If one of these is missing, it may not be possible to triage the problem without further information, so it is usually best to supply this information even if you're not sure it's relevant.
Installation
On Linux, you'll need to have pdflatex and one of the following installed:
- Pstoedit with its plot-svg back-end compiled in, or,
- Pstoedit and Skconvert, or,
- Pdf2svg (the one by David Barton & Matthew Flaschen, not the one by PDFtron)
If you have Inkscape 0.47, unpack the newest version of the Textext package and copy its files to ~/.config/inkscape/extensions/. If you have an earlier version of Inkscape, the correct location is ~/.inkscape/extensions/.
Note that Textext (starting from version 0.4), like the other Inkscape 0.46 extensions, requires that lxml is installed. (On Ubuntu, this is in the python-lxml package.) Textext 0.4 requires Inkscape 0.46, so if you are using an older version of Inkscape, stick with Textext 0.3.4.
On Windows with Inkscape 0.46, get the installer, and see the instructions below.
On Mac OS X, you will need to install a working version of pstoedit (apparently Fink and MacPorts offer binaries). After that, you may be lucky and get Textext to work on Inkscape 0.46 by copying textext.py and textext.inx to the extensions folder under the Inkscape folder; but I haven't tested this.
If you want to use Inkscape from MacPorts, there are notes written by Brian Clarke on this that may be helpful.
On Mac, you may also find these Inkscape forum posts useful:
Instructions for Windows
Inkscape 0.46
These instructions have been tested with Inkscape 0.46 for Windows.
Install a Latex distribution, eg. MikTex
Install Pstoedit
Install Ghostscript
Download and run Textext installer
(It'll install necessary library files from PyGTK in addition to the Inkscape extension. The library files go under python\Lib\site-packages in the Inkscape directory.)
If you get some "command not found errors" or other problems,
- Check also that you can run pdflatex.exe (from Miktex) and pstoedit.exe on the command prompt (cmd.exe). If not, add the directories where these files reside to your PATH environment variable.
Sorry about the blank terminal window that opens while the extension runs, it is forced by Inkscape.
Inkscape 0.45.1
These experimental instructions have been tested with Inkscape 0.45.1 for Windows.
Install a Latex distribution, eg. MikTex
Install Pstoedit
Install Ghostscript
Download tcl.zip and copy the ''tcl'' folder inside it to
c:\Program Files\Inkscape\python
This package contains some files necessary for building graphical user interfaces that were stripped from the Python distribution shipped with Inkscape.
Unpack textext-0.3.3.zip to
c:\Program Files\Inkscape\share\extensions
Check that you can run pdflatex.exe (from Miktex) and pstoedit.exe on the command prompt (cmd.exe). If not, add the directories where these files reside to your PATH environment variable.
The extension dialog will look somewhat ugly. However, it should anyway Work(TM).
