TexText on MacOS
Attention
Inkscape for MacOS is shipped as a dmg
-file from the Inkscape
website. However, on some systems the extensions and Python subsystem
shipped together with this installer seems to be broken. This is a problem
of Inkscape development, not of TexText. Hence, two
alternative approaches are shown here together with some steps how to
setup a Python installation which works together with the Inkscape extension
system.
Help us and other MacOS users by posting an issue on github if something goes wrong or you have ideas how to improve the procedure!
Method 1: Use Inkscape DMG installer (optionally together with Homebrew Python)
Install Inkscape: Download the installer from the Inkscape download site.
Install Inkscape. Verify that Inkscape launches and is of version 1.4.
Download the most recent package of TexText from Github release page (direct link: zip-file for MacOS). In case you are still using Inkscape 1.2, 1.1, or 1.0 download TexText 1.8.2!
Extract the package and change into the created directory.
Next we try to install and run TexText. If the installation or the launch of TexText fails a method is shown how to fix the problem.
Run:
python3 setup.py --pdflatex-executable=$(which pdflatex) --skip-requirements-check
or
python setup.py --pdflatex-executable=$(which pdflatex) --skip-requirements-check
The script will copy the required files into the user’s Inkscape configuration directory (usually this is
~/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions
)See Advanced installation options for further options provided by
setup.py
.Launch Inkscape and try to run TexText (Consult the usage instructions). If TexText fails to launch go to step 6. Otherwise you are done.
The Python installation shipped together with Inkscape seems to be broken. Hence, we need to install one manually. Assuming you have Homebrew installed, install Python 3.9:
brew install python@3.9
Then install the Tkinter GUI-library, NumPy and PyGObject:
brew install python-tk@3.9 brew install numpy brew install pygobject3
Install the lxml-tools and cssselect required by the Inkscape extensions:
$(brew --prefix)/opt/python@3.9/libexec/bin/pip install lxml $(brew --prefix)/opt/python@3.9/libexec/bin/pip install cssselect
Determine the path of the Homebrew python3 executable:
which $(brew --prefix)/opt/python@3.9/libexec/bin/python3
Navigate into the directory
/Users/<your username>/Library/Application Support/org.inkscape.Inkscape/config/inkscape
. (Replace <your username> by your MacOS user name)Open the file
preferences.xml
and navigate to the line that saysid="extensions"
. Add a linepython-interpreter="<python path>"
where<python path>
has to be replaced by the path determined in step 9. After this operation the entry should look like this:<group id="extensions" python-interpreter="<python path>" />
If the installation of TexText in step 4 failed try to install it with the following command, otherwise go to step 13:
$(brew --prefix)/opt/python@3.9/libexec/bin/python3 setup.py --pdflatex-executable=$(which pdflatex) --skip-requirements-check
Launch Inkscape and try to run TexText. In case of success you should see at least the Tkinter GUI which is a simplified version of the GTK gui described in the usage instructions.
Note
In case of installation problems refer to the Installation problems in the Troubleshooting section! If this still does not help open an issue on github. However, please note the the TexText-maintainers do not have access to a MacOS system. So we need your direct cooperation to improve the installation instructions.
Method 2: Use Homebrew Inkscape
Preparation
Install inkscape
brew install --cask inkscape
Verify that inkscape launches and is of version >= 1.4
Download and install TexText
Download the most recent package from GitHub release page (direct link: zip-file for MacOS)
Extract the package and change into the created directory.
Run:
python3 setup.py --pdflatex-executable=$(which pdflatex) --skip-requirements-check
or
python setup.py --pdflatex-executable=$(which pdflatex) --skip-requirements-check
The script will copy the required files into the user’s Inkscape configuration directory (usually this is
~/Library/Application Support/org.inkscape.Inkscape/config/inkscape/extensions
)If installation fails or TexText does not launch proceed with step 6 in method 1.
See Advanced installation options for further options provided by
setup.py
.
Now you can consult the usage instructions.