Home | Download | Help | Contribute | Plug-ins | About | Contact | Search
Mathematical formulas
Manual | Top | Previous | Next

To type mathematical formulas, you need first to enter “math mode” using one of the following methods:

InsertMathematicsFormula or $

This entry corresponds to small inline formulas like a2 + b2 = c2 inside a textual paragraph. Note that formulas are typeset specially so they do not take too much vertical space. For example, limits are always displayed on the left. Limits can be displayed below in formulas with FormatFormula styleon. In formulas, formula style is off by default.

InsertMathematicsEquation or A-$

This entry is used for entering bigger displayed equations, like

xn + yn = zn,

which are typeset in a paragraph of their own. You may use the shortcut A-* in order to give the equation a number (or to remove the number of an equation). Also, C-tab allows you to switch between inline formulas and displayed equations.

InsertMathematicsEquations or A-&

This entry allows you to create an eqnarray*, a three columns wide table-like environment (see creating tables). This environment is typically used for lists of multiple relations like

x + 0 = x
x + (−x) = 0
x + y = y + x
(x + y) + z = x + (y + z)

The first column is centered to the right, the second one at the middle and the last one at the left. An other typical use of the eqnarray* environment is a step by step computation like

(ⅇsin x + sin ⅇx)' = (ⅇsin x)' + (sin ⅇx)'
= (sin x)' ⅇsin x + (ⅇx)' sin ⅇx
= sin x cos x + ⅇx sin ⅇx,

in which many entries of the left column are left open.

In math mode, you have specific commands and key-combinations to type mathematical symbols and formulas. For instance, the F5 prefix can be used in order to enter Greek symbols.

The editor favors typing mathematics with a certain meaning. This feature, which will be developed more in future releases, is useful when communicating with a computer algebra package. At this moment, you should for instance explicitly type the multiplication * between symbols a and b. By default, typing a b will yield ab and not a b.

1.Main mathematical constructs

The main mathematical objects are created using the A- prefix as follows:

Shortcut Purpose Example
A-$ Text L = {x|x is sufficiently large}
A-f Fractions
a
b + c
A-s Square roots sqrt (x + y)
A-S n-th Roots sqrt3 (x3 + y3)
A-n Negations not(
a
b + c
)

Table 1. Creation of major mathematical markup.

Primes, subscripts and superscripts are created as follows:

Shortcut Purpose Example
' Primes f' or (g + h)'''
Back-primes `f
_ Subscripts xn or xi3
^ Superscripts x2, x
2
n
or ⅇx
A-l _ Left subscripts 2x
A-l ^ Left superscripts πx or He

Table 2. Creation of primes, subscripts and superscripts

Some important mathematical constructs are actually tabular constructs and are documented separately.

2.Typing mathematical symbols

The Greek characters are obtained in TeXmacs by combining the hyper modifier key H- with a letter. For instance, H-a yields α and H-G yields Γ. Recall that the F5 key is equivalent to H-, so that ρ can also be obtained by typing F5 r. Similarly, F6, F7, F8 and S-F6 can be used in order to type bold, calligraphic, fraktur and blackboard bold characters. For instance, F8 m yields m, S-F6 R yields R and F6 F7 Z yields Z.

Greek characters can also be obtained as “variants” of Latin characters using the tab-key. For instance, p tab yields π. The tab-key is also used for obtaining variants of the Greek letters themselves. For instance, both H-p tab and p tab tab yield ϖ.

Many other mathematical symbols are obtained by “natural” key-combinations. For instance, - > yields →, - - > yields ⟶ and > = yields ⩾. Similarly, | - yields ⊢, | - > yields ↦ and - > < - yields ⇄. Some general rules hold in order to obtain variants of symbols:

tab
is the main key for obtaining variants. For instance, > = yields ⩾, but > = tab yields ≥. Similarly, < tab yields ≺, < tab = yields ≼ and < tab = tab yields ⪯. Also, P tab yields ℘ and e tab yields the constant ⅇ = exp(1). You may “cycle back” using S-tab.
@
is used for putting symbols into circles or boxes. For instance, @ + yields ⊕ and @ x yields ⊗. Similarly, @ tab + yields ⊞.
/
is used for negations. For instance, = / yields ≠ and < = / yields not(⩽). Notice that < = tab tab / yields ≦̸, while < = tab tab / tab yields ≨.
!
is used after arrows in order to force scripts to be placed above or below the arrow. For instance, - - > ^ x yields ⟶x , but - - > ! ^ x yields ⟶x.

Several other symbols which cannot be entered naturally in the above way are obtained using the S-F5 prefix. Here follows a short table of such symbols:

Shortcut Symbol Shortcut Symbol
S-F5 a ⨿
S-F5 n S-F5 u
S-F5 v S-F5 w

Table 3. Some symbols which cannot be obtained using general rules in a natural way.

3.Typing big operators

The following key-combinations are used in order to create big symbols:

Shortcut Result Shortcut Result
S-F5 I S-F5 O &oint;
S-F5 P S-F5 A ⨿
S-F5 S S-F5 @ + oplus
S-F5 @ x otimes S-F5 @ . odot
S-F5 U cup S-F5 N cap
S-F5 V vee S-F5 W wedge

Table 4. Big mathematical operators.

The big integral signs admit two variants, depending on where you want to place subscripts and superscripts. By default, the scripts are placed as follows:

0
x
1 + x2
.

The alternative rendering “with limits”

intlim
0
x
1 + x2
.

is obtained using S-F5 L I. Similarly, you may type S-F5 L O in order to obtain &oint; with limits.

4.Typing large delimiters

Large delimiters are created as follows:

Shortcut Result Shortcut Result
A-( ( A-) )
A-[ [ A-] ]
A-{ { A-} }
A-< langle A-> rangle
A-/ / A-\ \

Table 5. Keyboard shortcuts for large delimiters.

In TeXmacs, large delimiters may either be “left delimiters”, “right delimiters” or “middle delimiters”. By default, (,[,{ and ⟨ are left delimiters, ),],} and ⟩ are right delimiters and |,/ and \ are middle delimiters. But there status can be changed using the A-l, A-r and A-m key combinations. For instance, A-l ) produces ), considered as a large left delimiter.

In TeX and LaTeX, “middle delimiters”, or “separators” do not exist; they are used for producing the vertical bars in formulas like

langle
a
b + c
|
p
q + r
|
a
b + c
rangle.

There may be as many middle delimiters between a left and a right delimiter as one wishes.

Sometimes you may want large delimiters of a particular size, instead of self-adjusting ones. This can be achieved by specifying a value for the optional second argument of the left, mid and right tags. For instance, typing left A-right ( A-right size return allows you to type a left bracket of a given size. Brackets for sizes 1, 2, 3, 4 and 5mm are displayed below:

( ( ( ((

When specifying an additional third argument, the second and third arguments correspond to the heights of the lower and upper limit of the bracket. This allows you to type the following kind of brackets:

f(x|y)

5.Wide mathematical accents

The table below how to type mathematical accents above symbols or entire formulas. Indeed, some of these accents automatically become as wide as the formulas below them.

Shortcut Example Wide variant Shortcut Result
A-~ x~ (x + y)~ A-' x´
A-^ x^ (x + y)^ A-‘ x`
A-B x¯ (x + y)¯ A-. x˙
A-V x&vect; AB&vect; A-" x¨
A-C xˇ (x + y)ˇ
A-U x˘ (x + y)˘

Table 6. Keyboard shortcuts for wide mathemarical accents.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".