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:
Set the scale factor of the node to 1.0
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.
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:
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}
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:
Include the directive
\usepackage[utf-8]{inputenc}
in the preamble file, see Preamble file.Use
xelatex
orlualatex
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):
Inkscape 0.48.x - 0.91.x (32-bit and 64-bit)
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.
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
:
Quit all running Inkscape processes
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
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" />
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 commandwhich python2.7
orwhich 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" />