Jaxe, your XML editor
Jaxe, your XML editor

Documentation for end users
• XML principles
• Definition of an XML language
• Launching Jaxe
• Using Jaxe
• Jaxe equations syntax
• Preferences

# Jaxe equations syntax

Author: Damien Guillaume

Jaxe has a specific equation editor, to add and change equations. An equation is edited in a text area, while the corresponding image is displayed above in real time. The equation images are saved in a folder called equations_myfile within the folder of the XML file myfile.xml.

This editor does not pretend to be exhaustive. Complex equations can be created with another editor and added in Jaxe with a copy-paste.

Here are some rules to follow in order to make the best use of the editor :

- Do not use spaces (they are ignored in the best case).
- Write the equation as if it would be interpreted mathematically and a numerical result would be calculated. As a consequence, always specify the operators, even when they should not be displayed.
- Use parenthesis to specify the order of the operations if it does not match the mathematical evaluation order.

As opposed to many equation editors, this editor analyses the mathematical meaning of the equation. It then builds the image from there. This makes it possible to get uniform graphical results for all equations. On the other hand, it is not possible to specify display constraints, for instance to obtain a little more space between two characters : the user gives the meaning for the equation, and the editor is in charge of finding the best display for it.

- Addition and subtraction

  Operators '`+`' and '`-`'.

- Multiplication

  Operator '`*`', displayed only when two numbers are multiplied.

  Example : `2*3*sin(1.5*pi)` is displayed :

- Division

  Operator '`/`' (displayed as a fraction) and functions '`slash`' and '`fraction`'

  Example : `slash(a;b)/c` is displayed :

- Function

  The parameter separator is the semicolon, to distinguish it from the coma, sometimes used in numbers : `functionname(arg1;arg2;...)`

  Example : `f(x;y)` is displayed :

- Power

  Operator '`^`'.

  Example : `x^y` is displayed :

- Subscript

  Operator '`_`'.

  Example : `x_(ab)` is displayed :

- Subscript superscript

  Function '`subsup`' with the first term, and the elements to display as subscript and superscript.

  Example : `subsup(A;1;2)` is displayed :

- Square root

  Function '`sqrt`'.

  Example : `sqrt(x/2)` is displayed :

- Root

  Function '`root`' with the degree of the root as the second parameter.

  Example : `root(x;3)` is displayed :

- Absolute values

  Function '`abs`'.

  Example : `abs(x^3)` is displayed :

- Power of e

  Function '`exp`'.

  Example : `exp(x^2)` is displayed :

- Integral

  Function '`int`', with 4 parameters: the function to integrate, the integration variable, and the minimum and maximum bounds.

  Example : `int(f(x);x;0;infty)` is displayed :

- Sum and product

  Functions '`sum`' and '`prod`', with 3 parameters: the function to sum up, and the minimum and maximum bounds.

  Example : `sum(ln(k)/k;k=1;10)` is displayed :

- Matrix

  Function '`matrix`', with the lines as parameter as a function '`line`'.

  Example : `matrix(line(1;2;3);line(4;5;6))` is displayed :

- Greek letters

  Variables with the letter name, with an uppercase to the first character of the name to get an uppercase Greek letter.

  Example : `alpha*Delta*thetasym*upsih*piv` is displayed :

- Special characters

  Variable with the name of the special character.

  `sun|star|earth|planck|infin|angstrom|ell|hat|bar|asterisk|bigg|...`

  Example : `M_sun/M_earth=3.329*10^5` is displayed :

- Special operators

  Special code with no space.

  `!=|~=|<=|>=|<<|>>|->|forall|exists|part|nabla|prop|cross|plusminus|cap|cup`

  Example : `forall a exists b<<c~=d>=e!=f` is displayed :

- Accents

  Function '`accent`' with the letter and the accent to add above.

  Example : `accent(AB;->)+accent(ABC;hat)+accent(x;bar)` is displayed :

- Time derivatives

  Function '`timed`' with the variable and the number of dots to display above.

  Example : `timed(theta;2)` is displayed :

- Vectors

  Function '`vector`' with the name of the vector.

  Example : `vector(u_theta)` is displayed :

- Scalar product

  Function '`scalarp`' with the two vectors as parameters.

  Example : `scalarp(vector(AB);vector(CD))` is displayed :

- Norm

  Function '`norm`' with the vector as a parameter.

  Example : `norm(vector(AB))` is displayed :

- Functions with no parenthesis

  Some functions are displayed without parenthesis when they have a single parameter with a variable.

  Example : `sin(a)*sin(b)` is displayed :

- Equation system

  Function '`system`', with the lines as parameters.

  Example : `system(x+y=2;x-2*y=3)` is displayed :

- Units

  Function '`unit`', with the unit as the second parameter.

  Example : `bigg=unit(6.67259*10^(-11);m^3*kg^(-1)*s^(-2))` is displayed :

  Note that units are displayed with a plain font, while a variable like is displayed with an italic font.

- Factorials

  Function '`fact`'.

  Example : `fact(x)` is displayed :

- Mean

  Function '`mean`'.

  Example : `mean(M_B)` is displayed :