TexText is a Python extension for the vector graphics editor Inkscape providing the possibility to add and re-edit LaTeX generated SVG elements to your drawing.

Our main motivation for installing TexText is to enable the use of mathematical typesetting, as this is currently not included in Inkscape by default.

Page content

Installation

To install the TexText extension, the recommended approach is to precisely follow the instructions provided at TexText's Github page; https://textext.github.io/textext/

Common issues

As the installation of TexText requires multiple steps, running into minor issues are not uncommon. To help you solve these issues, we will list possible solutions below. However, should you run into a problem that is not listed here and is not easily fixed, please let us know by sending a mail. We will then add both the problem as well as the solution to our list.

Error message: PATH not updated, original length XXXX > XXXX

Note that the X's in the title are acutally numbers, but as they are not always the same we have represented them by X's.

When: This error sometimes occurs when installing a software, e.g. pdf2svg.

Why: The most likely reason behind the error is that the PATH (you don't need to understand what this is to fix it, but you may learn about PATH here) has to many variables added, and are thus unable to add the new software as well.

Possible solution: To solve the issue, we will manually delete a variable from PATH and then add the correct one.

  1. To located the PATH on your computer, go to Settings→ Advanced System Settings→ Environment Variables (or simply search for Environment Variables). On computers with Norwegian language, search for Miljøvariabler.
  2. Then, located the variable named PATH, and click edit. As the error stated that the PATH were full, locate a path that is currently unecessary and remove it. However, if you do not know what you are doing, please read more about what PATH is or simply ask someone for help before you start changing something.
  3. Lastly, enter the path to your new software. If you are unsure what the specific path for your software is, you may also just rerun the installer that previously failed and gave you this error message.

Some images further describing the steps (unfortunately, they are currently only in Norwegian):

Error occured while converting text from Latex to SVG

Note that this error is currently only described for users using MiKTeX as their LaTeX distribution.

When: This error occurs after installing TexText, when trying to insert any expression into Inkscape (see image here).

Why: As far as we understand, this error is a result of not having the correct/enough packages installed for your MiKTeX distribution, combined with the Inkscape/TexText environment being unable to display the pop-up window asking you to install the correct ones.

Possible solution:

  1. First, it is recommended to confirm that your error is the same as the one we will discuss here. To do so, open the Windows Explorer (Windows + E), and enter the adress %LocalAppData%\MiKTeX\2.9\miktex\log\pdflatex.log (this is for version 2.9 of MiKTeX, so in case of a newer or older version, simply change the number or do it manually). This should open the log-file for pdflatex, preferably in the notepad or a similar text-editor.
  2. Verify that your log is similar to ours. If it is very different, be aware that our solution may not work for you.

    2020-04-06 19:25:15,952+0200 INFO  pdflatex - starting with command line: "C:\Program Files\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe" tmp.tex -interaction=nonstopmode -halt-on-error
    2020-04-06 19:25:15,975+0200 INFO  pdflatex - running 'initexmf' to refresh the file name database
    2020-04-06 19:25:19,926+0200 INFO  pdflatex - running 'initexmf' to create font map files
    2020-04-06 19:25:26,043+0200 INFO  pdflatex - allowing known shell commands
    2020-04-06 19:25:26,043+0200 INFO  pdflatex - enabling input (output) from (to) processes
    2020-04-06 19:25:26,087+0200 INFO  pdflatex - going to create file: pdflatex.fmt
    2020-04-06 19:25:32,178+0200 FATAL pdflatex - GUI framework cannot be initialized.
    2020-04-06 19:25:32,179+0200 FATAL pdflatex - Info: 
    2020-04-06 19:25:32,179+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
    2020-04-06 19:25:32,179+0200 FATAL pdflatex - Line: 77
    2020-04-06 19:25:32,179+0200 INFO  pdflatex - finishing with exit code 1
  3. To fix the error, open the MiKTeX Console (simply search your programs for MiKTeX Console to locate it).
  4. Enter the settings tab, and choose Always install missing packages on-the-fly. Note that since a pop-up window is unable to be displayed, the Ask me option will not solve the issue.
  5. Lastly, restart Inkscape and try TexText again. Be aware that it might use some time the first try, as it probably needs to install several packages.

How to use

TexText is very easy to use, so as an introduction we have only provided you with two short examples. The first example displayes how to create a new element, where as the second example shows how to edit an already existing element.

Inkscape TexText.mp4Inkscape TexText edit.mp4



  • No labels