AsciiMath syntax
================

[[Parent]]: remark_syntax.txt

Here we provide a brief tutorial to AsciiMath syntax
which is used to typeset mathematics in Remark.
We provide an external link to complete documentation below.
The _math mode_ is activated and deactivated by two subsequent 
characters of '. Unfortunately, [a current unsolved problem][1] in 
Remark prohibits me from explicitly writing those characters 
down since they would be interpreted as a mathematical 
expression independent of whether it is written as verbatim content
or not. Thus, in the examples below I will be leaving those
characters out. However, they must be included to produce
the MathML output. 

[1]: [[Ref: problem.txt]]

[[set MathExample]]:
	[[-+Verbatim]]: 
		[[outer parameter]]

	''[[parameter]]''

Some basic examples
-------------------

### Quadratic equation

[[MathExample]]:
	x = (-b +- sqrt(b^2 - 4ac)) / (2a)

### Relations

[[MathExample]]:
	R " is reflexive" <=> forall x: x R x

[[MathExample]]:	
	R " is transitive" <=> forall x, y, z: xRy quad ^^ quad yRz => xRz

In this example I had to add the quad's to make the spacing
look natural. Unfortunately AsciiMathML does not always make
a perfect work in the conversion...

### Continuity

[[MathExample]]:
	forall epsilon > 0 in RR: exists delta > 0 in RR: AA y: d_1(x, y) < delta => d_2(f(x), f(y)) < epsilon

A more comprehensive demo
-------------------------

These examples are a reproduction of the examples
given in the official AsciiMathML pages (linked below)
with some additions.

### Basic constructs

[[MathExample]]:
	(x+1)/(x-1) x^(i+j) x_(ij) sqrt(x) root(n)(x) stackrel(+)(->) text(any) "any"

### Operation symbols

[[MathExample]]:
	+ - * // \\ xx -: @ o+ ox sum prod ^^ ^^^ vv vvv nn nnn uu uuu

### Relation symbols

[[MathExample]]:
	= != < <= > >= -< >- in !in sub sup sube supe -= ~= ~~ prop

### Logical symbols

[[MathExample]]:
	and or not => if iff forall exists TT |--

### Miscellaneous symbols

[[MathExample]]:
	int oint del grad +- O/ oo aleph ... cdots \ quad qquad diamond square |~ ~| CC NN QQ RR ZZ

### Standard functions

[[MathExample]]:
	sin cos tan csc sec cot sinh cosh tanh log ln det dim lim mod gcd lcm

### Grouping brackets

[[MathExample]]:
	(x) [x] {x} (:x:) {:x:}

### Arrows

[[MathExample]]:
	uarr darr -> larr harr => lArr <=>

### Accents

[[MathExample]]:
	hat x bar x ul x vec x dot x ddot x

[[MathExample]]:
	hat(2 + 3 * 4)

[[MathExample]]:
	bar(2 + 3 * 4)

[[MathExample]]:
	ul(2 + 3 * 4)
	
[[MathExample]]:
	vec(2 + 3 * 4)

### Font commands

[[MathExample]]:
	bb("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	
[[MathExample]]:
	bbb("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	
[[MathExample]]:
	cc("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	
[[MathExample]]:
	tt("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	
[[MathExample]]:
	fr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	
[[MathExample]]:
	sf("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")

### Matrices

[[MathExample]]:
	[[a,b],[c,d]] ((1,0),(0,1))

### Greek letters

[[MathExample]]:
	alpha beta chi delta Delta epsi eta gamma Gamma iota kappa lambda 
	Lambda mu nu omega Omega phi Phi pi Pi psi rho sigma Sigma tau theta 
	Theta upsilon xi Xi zeta

Links
-----

[Complete AsciiMath documentation][AsciiMath]

[AsciiMath]: http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.html
 