Typing and styles
How NeoMath's visual editor classifies each character, the typing styles, the Greek letter map and how the equation becomes MathML.
On this page
NeoMath’s visual editor decides the role of each typed character by itself. The rules below are the ones the editor applies today and are checked by automated tests.
Automatic classification#
In the Math style (the default):
| Character | Role |
|---|---|
digit 0 to 9 |
number (mn) |
| any letter (Latin, Greek…) | identifier (mi), in italics |
the rest (+ = ( ) . , ∞…) |
operator (mo) |
Automatic swaps in operators:
| You type | It becomes |
|---|---|
- |
− (minus sign, U+2212) |
* |
· (multiplication dot) |
' |
′ (prime) |
A space is only inserted in the Text style; in the others it is ignored, because math spacing is computed by NeoMath.
Typing styles#
| Style | Effect on each character |
|---|---|
| Math | automatic classification |
| Text | text (mtext), including spaces and numbers |
| Function | letters in upright type |
| Variable | letters in italics, by preference |
| Greek | Latin letters become Greek by the map below |
| Vector-Matrix | letters and digits in bold |
With a selection, applying a style rewrites the selected characters, including inside fractions and indices.
Greek map#
| Latin | a | b | g | d | e | z | h | q | i | k | l | m |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Greek | α | β | γ | δ | ε | ζ | η | θ | ι | κ | λ | μ |
| Latin | n | x | o | p | r | s | t | u | f | c | y | w |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Greek | ν | ξ | ο | π | ρ | σ | τ | υ | φ | χ | ψ | ω |
Uppercase letters follow the same map. j and v have no pair and stay as they are. Ctrl+G applies the map to a single letter and then turns itself off.
How the equation becomes MathML#
- Consecutive digits (and a dot between two digits), with the same variant and color, form a single number:
30.5. - Consecutive text with the same variant and color forms a single
mtext. - Consecutive letters form a function when the longest prefix of two or more letters is a known name (
sin,log,lim…); the function comes out in upright type. - An upright variant comes out as
mathvariant="normal"; bold comes out asmathvariant="bold". - Own color comes out as
mathcolor. - Superscripts and subscripts use the previous element as the base.
Recognized function names#
sin, cos, tan, cot, sec, csc, arcsin, arccos, arctan, sinh, cosh, tanh, coth, log, ln, lg, exp, lim, max, min, sup, inf, det, dim, ker, deg, gcd, arg, hom, Pr, liminf, limsup, mod. NeoMath also knows the names in Portuguese, such as sen.
Size of a part#
With a selection, Ctrl+B1 to Ctrl+B7 wrap the part in a preference size (full, script, subscript, symbol, subsymbol, user 1 and user 2), stored as <mstyle neo:tamanho="…">. Ctrl+B0 removes it.