Math/basic
<Math |
Introduction
To tell TeX that an expression needs to be typeset using conventions for math, type the expression in $
...$
. For examples $x$
gives
, while $2$
gives . Notice that the x is in italic while the 2 is upright. This is the usual mathematic convention. You can also write in the math mode using the command {{cmd|math</cmd> or {{cmd|mathematics</cmd>.
Thus, the following three are equivalent. Use the style that you prefer.
Pythagoras formula, stating $a^2 + b^2 = c^2$ was one of the first trigonometric results
Pythagoras formula, stating \math{a^2 + b^2 = c^2} was one of the first trigonometric results
Pythagoras formula, stating \mathematics{a^2 + b^2 = c^2} was one of the first trigonometric results
and gives
Binary Operators Relations
Basic binary symbols can be produced by typing the correspoding keyboard character. These include
+ - = < >
A general expressions can be input in the natural manner. For example $x+y$
gives . Notice that TeX took care of the spacing around +
. Mathematicians use a lot of symbols that are not avialable on the keyboard. TeX (and ConTeXt) provide macros to input them. For example $x \times y$
gives . The following is a parial list of frequently used binary operators and relations.
Commonly Used Binary Operators | Commonly used relation symbols | Set Relations | |||
---|---|---|---|---|---|
pm</cmd> | leq</cmd> | subset</cmd> | |||
mp</cmd> | ll</cmd> | subseteq</cmd> | |||
times</cmd> | geq</cmd> | supset</cmd> | |||
div</cmd> | gg</cmd> | supseteq</cmd> | |||
ast</cmd> | equiv</cmd> | cap</cmd> | |||
star</cmd> | sim</cmd> | cup</cmd> | |||
bullet</cmd> | simeq</cmd> | in</cmd> | |||
circ</cmd> | approx</cmd> | ||||
cdot</cmd> | neq</cmd> |
Greek Letters
To type the greek character α you can say $\alpha$
which gives . If you have a utf enabled keyboard, you can also type the α directly and ConTeXt will correctly interpret it. For example,
\enableregime[utf] Here is some Greek math $α^2 + β^2 = γ^2$
Here is a complete list of greek letters
lowercase greek letters | variation | uppercase greek letters | |||
---|---|---|---|---|---|
alpha</cmd> | |||||
beta</cmd> | |||||
gamma</cmd> | Gamma</cmd> | ||||
delta</cmd> | Delta</cmd> | ||||
epsilon</cmd> | varepsilon</cmd> | ||||
zeta</cmd> | |||||
eta</cmd> | |||||
theta</cmd> | vartheta</cmd> | Theta</cmd> | |||
iota</cmd> | |||||
kappa</cmd> | |||||
lambda</cmd> | Lambda</cmd> | ||||
mu</cmd> | |||||
nu</cmd> | |||||
xi</cmd> | Xi</cmd> | ||||
omicron</cmd> | |||||
pi</cmd> | varpi</cmd> | Pi</cmd> | |||
rho</cmd> | varrho</cmd> | ||||
sigma</cmd> | varsigma</cmd> | Sigma</cmd> | |||
tau</cmd> | |||||
upsilon</cmd> | Upsilon</cmd> | ||||
phi</cmd> | Phi</cmd> | ||||
chi</cmd> | |||||
psi</cmd> | Psi</cmd> | ||||
[[Command/omega</cmd>|\omega</cmd>]]$.
To align superscripts and subscripts one after the other (not above/below each other), add empty braces List of All Math macrosIn ConTeXt MkII, you can see the list of all math macros by {{cmd|showmathcharacters</cmd>. In MkIV, \usemodule[fnt-25] followed by {{cmd|showmathfontcharacters</cmd> produces a lengthy annotated catalogue. Here is the first page of this list
|