Frequently Asked Questions (FAQ, TexText 0.11)

Explicit setting of font size

If you want the font size of your compiled LaTeX code to be of a specific size then you have to do two things:

  1. Set the scale factor of the node to 1.0

  2. Enter your code as following if you want to have a 14pt sized font for the text This is my Text:

\fontsize{14pt}{1em}{\selectfont This is my Text.}

The resulting text should be of equal height as if has been typeset directly in Inkscape.

Font size example

Selection of special fonts

Usually your code is typeset in the LaTeX standard fonts. As usual, you can use commands like textbf{}, textsf{} etc. in your code. If you want to select a special font, e.g. the beloved Times New Roman from MS Word, then proceed as follows:

  1. Open the file default_packages.tex which resides in the extension subdirectory (%USERPROFILE%\AppData\Roaming\Inkscape\extensions\textext on Windows, ~/.config/inkscape/extensions/textext on Linux) and enter the following two lines:

\usepackage{fontspec}
\setmainfont{Times New Roman}
  1. Save the file and recompile your node. You can also define different preamble files and load them dependent on your node, see Dialog overview.

Using special characters like German Umlaute (äüö) etc.

If you want to use special characters which are not understood by plain LaTeX in your nodes you have two options:

  1. Include the directive \usepackage[utf-8]{inputenc} in the preamble file, see Preamble file.

  2. Use xelatex or lualatex as TeX command, see Available TeX compilers.

Using TexText with older Inkscape versions

Unfortunately the current TexText 0.11 release does not work with Inkscape versions 0.91.x and 0.48.x, at least under Windows. The reason is the underlying Python interpreter which must be of version 2.7. If you need to work with an older Inkscape version you are encouraged to use TexText 0.11 0.8.x. You can download it from here https://github.com/textext/textext/releases .

These are the required PyGTK-Packages (Windows):

Installation instructions:

Note

If you manage to run Inkscape < 0.92 with Python 2.7 you can use the most recent version of TexText 0.11.

Extension not shown in the Inkscape Extension menu

If the the TexText 0.11 entry is not shown in the Extension menu of Inkscape proceed with the following checks:

  1. Make sure that the setup procedure completed successfully. Double check its final output.

  2. Launch Inkscape, open the Edit menu, select Preferences, then select System in the tree-view to the left and check the entry User exentsions in the right part of the window. Its entry should be

    • on Linux/ MacOS: /home/[your user name]/.config/inkscape/extensions

    • on Windows: C:\Users\[Your user name]\AppData\Roaming\inkscape\extensions

    If you use different locations you must run the setup script with the --inkscape-extensions-path option.

    Linux/ MacOS:

    python setup.py --inkscape-extensions-path /path/to/your/extensions
    

    Windows

    setup_win.bat /p:"--inkscape-extensions-path 'C:\Path\to your extensions'"
    

    Alternatively you can select the correct directory in the GUI installer.

Windows with MiKTeX: Compilation fails with empty error dialog

If the compilation of your LaTeX code fails with an empty error dialog and the expanded view of stderr (see LaTeX and toolchain errors) shows an entry like

Sorry, but pdflatex.exe did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

the most likely reason is that MiKTeX tries to install a package on the fly and fails to do so. Manually compile your code as described in Manual use of the toolchain. Then you will see what goes wrong so you can fix it. See also the warning in Install pdflatex/lualatex/xelatex.

Set Inkscape python interpreter to Python2

Inkscape by default uses python executable to run python extension. On recent systems python defaults to be python3. To run TexText 0.11 you need to change inkscape python-interpreter to python2:

  1. Quit all running Inkscape processes

  2. Open your perferences.xml file with a text editor (usually ~/.config/inkscape/preferences.xml)

    Note

    Find the exact location of preference file by going to Edit|Preferences|System|User Preferences

  3. Search the group which holds settings for the extension system itself and options of various extensions:

    <group
       id="extensions"
    
       org.ekips.filter.gears.teeth="24"
       org.ekips.filter.gears.pitch="20"
       org.ekips.filter.gears.angle="20" />
    
  4. Insert a key for the interpreter, for example python-interpreter for setting the program that should be used to run python extensions, and set the string to the absolute path to the python binary which is compatible with Inkscape’s current extension scripts (in the example below, the path is /usr/bin/python2.7, you can determine it in a terminal via the command which python2.7 or which python2):

    <group
       id="extensions"
       python-interpreter="/usr/bin/python2.7"
    
       org.ekips.filter.gears.teeth="24"
       org.ekips.filter.gears.pitch="20"
       org.ekips.filter.gears.angle="20" />