File: textengine.txt

package info (click to toggle)
pyx3 0.17-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,328 kB
  • sloc: python: 27,656; makefile: 225; ansic: 130; sh: 17
file content (21 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Running and controlling TeX

! Usually, all you will ever need is a single `textengine` instance which
controls a single running TeX or LaTeX instance at a time or uses direct Unicode text typesetting. To make life easy to
our users..., such an instance is created automatically upon startup and its
called the `defaulttextengine`. Whenever you use the function shortcuts like
`text.text()` and in particular `text.set()`, you are accessing this
`defaulttextengine` instance. Also, the shortcut method `text` of any canvas
instance uses this `defaulttextengine` by default.

!! However, it is possible to create several textengine instances. In this
example, we are using three of them. To make it a little more interesting, we
instruct the `defaulttextengine` to use LaTeX, while keeping TeX for the
`plaintex` instance. It is you turn to use expressions valid in TeX or
LaTeX only at the different `textengine` instances. Additionally we show the
use of a `unicodetext` instance to typeset Unicode text.

!! Note that you do not have to worry about mixing the results of different
textengines into a single output. Even the embedded fonts in the output are
shared. You can, by the way, also restart a plain TeX or LaTeX engines
including the `defaulttextengine`, which is a plain TeX engine.