An Inkscape extension: Latex/Tex editor for Inkscape, inspired by textext.
This extension uses Inkscape build-in extension system, does not require TK or PyGtk as textext. Live preview feature is supported. You can obtain orginal TeX source from View Old Text tab.
Just drop writetex.py
and writetex.inx
to Inkscape extension folder, which is normally at $inkscapeFolder$/share/extensions
. Make sure XeLatex
and PDF2SVG
or PDFtoEDIT
are in you path.
For ease of the users, I also provide unofficial PDFTOSVG binaries for Windows and Mac OSX users.
- For Windows user, binary version of pdf2svg is provided.
- For Mac OSX user, binary version of both pstoedit and pdf2svg are provided.
- For Linux and other OS, pdf2svg or pstoedit usually can be installed from default package manager.
The basic UI is like this:
By default, WriteTeX use XeLatex to convert text to pdf. If you wish to use pdflatex, just change the command in the code. You can use PDF2SVG or PDFtoEDIt to convert PDF to SVG. There are slightly difference in trading SVGs generated by PDF2SVG and PDFtoEDIT.
Normally, WriteTeX trys to keep transform in old and new object. But you can overide this behaviour by check the Rescale checkbox, which will rescale the object by current scale factor accordingly.
For long text, you may want to edit it in your TeX editor. You only need to write the body of the text. Paste the path of the file in to the EditBox. If you want to specify preamble file, specify it in the Preamble File EditBox. Then you are good to go.
Due to the limitation of Inkscape build-in extension system, I cannot set default TeX Text as the orignal TeX string. Therefore, we have this bypass function. If you want to edit the orignal TeX strings, use this function to obtain you orignal TeX Strings. Then edit the strings. Here is a demo on obtain orginal TeX strings:
If there are other ways to do so, please tell me.
Please refer to my website for more information about me and the extension.