Writing your first interface with TeXmacs |
In order to write your first interface to TeXmacs, we recommend you to follow the following steps:
After doing this, your program will be available under the name
Usually, step 2 is the most complicated one and the time it will cost you depends on how your system was designed. If you designed clean output routines (including the routines for displaying error messages), then it usually suffices to modify these by mimicking the mycas example and reusing existing LaTeX output routines, which most systems provide.
At the moment, we only implemented LaTeX as a standard transmission format for mathematical formulas, because this is the format which is most widely used. In the future, we intend to implement more semantically secure formats, and we recommend you to keep in mind the possibility of sending your output in tree format.
Nevertheless, we enriched standard LaTeX with the \* and \bignone commands for multiplication and closing big operators. This allows us to distinguish between:
a \* (b + c)
(or a multiplied by b + c) and:
f(x + y)
(or f applied to x + y). Similarly, in:
\sum_{i=1}^m a_i \bignone + \sum_{j=1}^n b_j \bignone
the \bignone command is used in order to specify the scopes of the \sum operators.
It turns out that the systematic use of the \* and \bignone commands, in combination with clean LaTeX output for the remaining constructs, makes it a priori possible to associate an appropriate meaning to your output. In particular, this usually makes it possible to write additional routines for copying and pasting formulae between different systems.