1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
.. |TexText| replace:: **TexText for Inkscape 1.0**
.. |Inkscape| replace:: **Inkscape 1.0**
.. |InkscapeOld| replace:: **Inkscape 0.92.x**
.. role:: bash(code)
:language: bash
:class: highlight
.. role:: latex(code)
:language: latex
:class: highlight
.. _linux-install:
==================
|TexText| on Linux
==================
.. _linux-install-preparation:
Preparation
===========
1. Make sure that |Inkscape| or later is installed on your system via your favorite
package manager.
On **Ubuntu 18.04** + **20.04** and its derivates |Inkscape| is not part of
the default distribution. Perform the following steps to install it:
- Remove any old version of Inkscape
.. code-block:: bash
sudo apt remove inkscape
- Add the Inkscape repository to your apt package manager:
.. code-block:: bash
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
- Install |Inkscape|
.. code-block:: bash
sudo apt install inkscape
Check if it is able to launch. You can verify this by invoking :bash:`inkscape --version` from
a terminal. It should output :bash:`1.0`.
.. important::
|TexText| will not function if you installed |Inkscape| via **SNAP** or **FLATPACK**.
The reason is that |Inkscape| 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|.
2. Make sure that an operational LaTeX distribution is installed on your system. You can verify
this by invoking at least one of :bash:`pdflatex --version`, :bash:`xelatex --version`, and
:bash:`lualatex --version` in a terminal.
3. Optional: If you wish to have syntax highlighting and some other :ref:`nice features <usage-gui-config>`
enabled in the |TexText|-Gui install GTKSourceView:
.. code-block:: bash
sudo apt install gir1.2-gtksource-3.0
.. _linux-install-textext:
Download and install |TexText|
==============================
.. important::
Compared to previous versions |TexText| does not need any conversion utilities like
ghostscript, pstoedit or pdfsvg.
1. Download the most recent package from :textext_current_release_page:`GitHub release page <release>`
(direct links: :textext_download_zip:`.zip <Linux>`, :textext_download_tgz:`.tar.gz <Linux>`)
2. Extract the package and change into the created directory.
3. If you installed Inkscape via a package manager run :bash:`setup.py` from your terminal:
.. code-block:: bash
python3 setup.py
or
.. code-block:: bash
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| are missing.
Install them. If setup complains about missing GTK or Tkinter bindings please go to
:ref:`linux-install-gui`.
.. note::
If you use an Inkscape AppImage |TexText| should be installed as follows. However,
due to an `Inkscape bug in AppImages <https://gitlab.com/inkscape/inkscape/-/issues/1306>`_
all Python extensions are currently broken:
.. code-block:: bash
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 :ref:`usage instructions <gui>`. In case of problems consult
:ref:`troubleshooting`.
.. _linux-install-gui:
Manually install the GUI library bindings
=========================================
In the case that |Inkscape| 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
.. code-block:: bash
python --version
Keep the returned major version number (Python **2** or Python **3**) in mind
for the following instructions. If the command fails try :bash:`python3 --version`. The
major version is then **3** in the following steps.
.. _linux-install-gtk3:
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``)
.. code-block:: bash
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:
.. code-block:: bash
sudo apt-get install python3-gi gir1.2-gtk-3.0 gir1.2-gtksource-3.0
.. _linux-install-tkinter:
Install Tkinter (not recommended)
---------------------------------
.. important::
Tkinter support is deprecated and will be removed in future versions of |TexText|.
If you really need this interface please leave a comment in `this issue on github <https://github.com/textext/textext/issues/209>`_.
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**:
.. code-block:: bash
sudo apt-get install python-tk
If your Inkscape installation runs **Python 3**:
.. code-block:: bash
sudo apt-get install python3-tk
|