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)

  1. Install Inkscape: Download the installer from the Inkscape download site.

  2. Install Inkscape. Verify that Inkscape launches and is of version 1.x.

  3. Download the most recent package of TexText from Github release page (direct link: zip-file for MacOS)

    Extract the package and change into the created directory.

  4. 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.

  5. Launch Inkscape and try to run TexText (Consult the usage instructions). If TexText fails to launch go to step 6. Otherwise you are done.

  6. 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
    
  7. Then install the Tkinter GUI-library, NumPy and PyGObject:

    brew install python-tk@3.9
    brew install numpy
    brew install pygobject3
    
  8. Install the lxml-tools required by the Inkscape extensions:

    $(brew --prefix)/opt/python@3.9/libexec/bin/pip install lxml
    
  9. Determine the path of the Homebrew python3 executable:

    which $(brew --prefix)/opt/python@3.9/libexec/bin/python3
    
  10. Navigate into the directory /Users/<your username>/Library/Application Support/org.inkscape.Inkscape/config/inkscape. (Replace <your username> by your MacOS user name)

  11. Open the file preferences.xml and navigate to the line that says id="extensions". Add a line python-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>"
    />
    
  12. 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
    
  13. 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

  1. Install inkscape

    brew install --cask inkscape
    

    Verify that inkscape launches and is of version >= 1.x.

Download and install TexText

  1. Download the most recent package from GitHub release page (direct link: zip-file for MacOS)

  2. Extract the package and change into the created directory.

  3. 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.