TexText for Inkscape 1.0 on Linux¶
Preparation¶
Make sure that Inkscape 1.0 or later is installed on your system via your favorite package manager.
On Ubuntu 18.04 + 20.04 and its derivates Inkscape 1.0 is not part of the default distribution. Perform the following steps to install it:
Remove any old version of Inkscape
sudo apt remove inkscape
Add the Inkscape repository to your apt package manager:
sudo add-apt-repository ppa:inkscape.dev/stable sudo apt update
Install Inkscape 1.0
sudo apt install inkscape
Check if it is able to launch. You can verify this by invoking
inkscape --version
from a terminal. It should output1.0
.Important
TexText for Inkscape 1.0 will not function if you installed Inkscape 1.0 via SNAP or FLATPACK. The reason is that Inkscape 1.0 will run in sandboxed mode in these environments and, hence, cannot access you LaTeX distribution to compile your snippets! This is a conceptional problem of snap/ flatpack, not of TexText for Inkscape 1.0.
Make sure that an operational LaTeX distribution is installed on your system. You can verify this by invoking at least one of
pdflatex --version
,xelatex --version
, andlualatex --version
in a terminal.Optional: If you wish to have syntax highlighting and some other nice features enabled in the TexText for Inkscape 1.0-Gui install GTKSourceView:
sudo apt install gir1.2-gtksource-3.0
Download and install TexText for Inkscape 1.0¶
Important
Compared to previous versions TexText for Inkscape 1.0 does not need any conversion utilities like ghostscript, pstoedit or pdfsvg.
Download the most recent package from GitHub release page (direct links: .zip, .tar.gz)
Extract the package and change into the created directory.
If you installed Inkscape via a package manager run
setup.py
from your terminal:python3 setup.py
or
python setup.py
In both cases it will copy the required files into the user’s Inkscape configuration directory (usually this is
~/.config/inkscape/extensions
)Setup will inform you if some of the prerequisites needed by TexText for Inkscape 1.0 are missing. Install them. If setup complains about missing GTK or Tkinter bindings please go to Manually install the GUI library bindings.
Note
If you use an Inkscape AppImage TexText for Inkscape 1.0 should be installed as follows. However, due to an Inkscape bug in AppImages all Python extensions are currently broken:
python setup.py --skip-requirements-check --inkscape-executable /home/path/to/your/appimage/Inkscape-4035a4f-x86_64.AppImage
You are done. Now you can consult the usage instructions. In case of problems consult Troubleshooting.
Manually install the GUI library bindings¶
In the case that Inkscape 1.0 has not been automatically installed together with the necessary
Python GUI bindings you need to install them manually. You have two options: GTK3
(recommended)
or Tkinter
.
At first you need to discover the Python interpreter that is used by your Inkscape installation. Enter the following command in a terminal
python --version
Keep the returned major version number (Python 2 or Python 3) in mind
for the following instructions. If the command fails try python3 --version
. The
major version is then 3 in the following steps.
Install Python GTK3 bindings (recommended)¶
If your Inkscape installation runs Python 2 you need the Python 2.x bindings for
gobject-introspection libraries (python-gi
), the GTK+ graphical user interface library
(gir1.2-gtk-3.0
) and the gir files for the GTK+ syntax highlighting widget
(gir1.2-gtksource-3.0
)
sudo apt-get install python-gi gir1.2-gtk-3.0 gir1.2-gtksource-3.0
If your Inkscape installation runs Python 3 you need the Python 3 version of the gobject-introspection. The rest remains the same:
sudo apt-get install python3-gi gir1.2-gtk-3.0 gir1.2-gtksource-3.0
Install Tkinter (not recommended)¶
Important
Tkinter support is deprecated and will be removed in future versions of TexText for Inkscape 1.0. If you really need this interface please leave a comment in this issue on github.
Tkinter is functioning but has a limited interface compared to GTK version, so it’s not
recommended. To use Tkinter
install the Python tk
package.
If your Inkscape installation runs Python 2:
sudo apt-get install python-tk
If your Inkscape installation runs Python 3:
sudo apt-get install python3-tk