Formula Renderer Basics

Click on a link below to jump to spots on this page:

syntax highlighting | multiplication | division | exponents | subscripts | smaller | quotes | keywords | symbols (comparisons, logic, sets, &c.) | quantifiers | greek letters | Sigma | roots | integrals


syntax highlighting

Syntax highlighting makes equations easier to read.
 
x=1
17=2x+3(y+z)
-4-7ab>=20


multiplication

the 'dot' for multiplication may be expressed by '*'
 
a*b

you can also use the usual 'x' as a times sign, by saying 'times'

 
3 times 4=12

 
 


division

fractions may be expressed by '/'. Brackets and absolute value signs adapt to the size
 
a/b 
(x/y)=|c/d| 

1/2/3/4< =x^y/z 

you can also use the 'divided by' sign by typing 'div'

 
12 div 3=4


exponents

Exponents are expressed by '^'
 
x^2
a^b^c^d^e

commonly used precedence is respected (eg. exponentiation binds more tightly than addition). This may be overridden by using parentheses, (), which disappear in this case:

 
x^2+2
x^(2y+3)

To make the parentheses appear, double them.

 
x^((n-1))


subscripts

Subscripts are similar to exponents, using the underbar _ :
 
x_n
x_(i+1)
x_((i+1))


smaller

The '& ' makes things smaller, in order to make fractions look better, inline:
 
3& 1/2
x^2+3 & dy/dx

or as part of an exponent.

 
y^(& 1/2)


quotes

use quotes (") to add text
 
"let" a=1 "and" b=2pi


keywords

keywords appear in plain style, in green:
 
sin x cos x
3tan theta cot theta

arcsin arccos arctan arccot
sinh cosh tanh coth

 
sin^(2) x cos^(2) x
log_(10) n = ln n/ln 10


symbols

Many common symbols are available, by typing a mnemonic keyword or sequence of symbols.

Comparisons:

 
>=
<=
!=
~=
==

Logic:

 
ergo
and
or
not

set notation:

 
subset superset
varsubset varsuperset
notsubset

null

 
element
invelement notelement 

intersection union

Miscellaneous symbols:

 
plusminus degrees
infinity infty

oplus otimes
base 

div times


Quantifiers

The logical quantifiers "for all" and "there is" are available:
forall x x^2>=0
thereis x x^2<0
forall epsilon>0


Greek Letters


A full complement of the Greek alphabet is available by simply typing the letter name:
 

 
alpha beta gamma delta epsilon zeta eta theta iota kappa lambda
mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega

Upper case is achieved by capitalizing the first letter of the name, as in TEX.
 

 
Alpha Beta Gamma Delta Epsilon Zeta Eta Theta Iota Kappa Lambda
Mu Nu Xi Omicron Pi Rho Tau Upsilon Phi Chi Psi Omega

Several variant forms are also available.
 

 
vartheta varupsilon varphi varomega del

 


Sigma

Sigma is represented in larger typeface, as the usual summation operator. It is, moreover, an operator as well as a typesetting macro. Therefore, it behaves differently.

The lower, then upper limits appear within parentheses, separated by a comma.

For example:

 
Sigma (i=0, infty) a_i

The arguments may be omitted, to just get the symbol:

 
Sigma (){x/1,x/2,x/3, ...}


roots

typesetting macros grab formulae to their right using a similar syntax to a function call -- eg. f(x) -- except that the parentheses are often optional. A simple radical symbol is given by sqrt:
 
sqrt zeta
sqrt sqrt sqrt sqrt sqrt sqrt sqrt null
sqrt x=7

To override the default grouping, use parentheses:

 
sqrt n/3
sqrt (n)/3 

to specify an inverse-exponent (the left-hand superscript), use the "root" macro. The base is superscript is separated from the operand by a comma.

 
root 3,x
root & z/2,phi

grouping is similar to that for sqrt. You may use parentheses to end the macro:

 
root 12,2+x
root (12,2)+x

to apply recursively, precise syntax is required.

 
root (root (root (root (w,x) ,y),z),psi)


integrals

A similar syntax applies to calculus symbols. Integral by itself takes no arguments.
 
integral x^2+2x+3

to specify endpoints, use 'intover' (INTegral OVER). You may use a comma or parentheses to delimit the macro:

 
intover 0,infty, 1/x 
intover (a,b) sin^(2) theta cos^(2) theta

Many calculus texts employ a symbol to signify the difference over a particular domain. In this case, it is implemented using the vertical bar (|). "diffover" has the same syntax as "intover" above.

 
diffover a,b,f(x)=f(b)-f(a)



Click on a link below to jump to spots on this page:

syntax highlighting | multiplication | division | exponents | subscripts | smaller | quotes | keywords | symbols (comparisons, logic, sets, &c.) | greek letters | Sigma | roots | integrals

Copyright © 1999 DistanceEd.com