VISUAL PHYSICS
Unconventional Explorations into Uninhabited Areas of Physics
Through Thought Experiments in the Form of Simulations...


This is NOT an educational site. The views expressed here are not those of mainstream physics.
If you want to contribute to the wiki, email me at the address given in the Contact page.
Legend:  sim  : Article with simulation --  stb  : Article that needs development (stub).

Electrostatic Acceleration as the Result of Spacetime Curvature and Help:Formula: Difference between pages

From Visual Physics Wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
<table class="pagetable">
<table width="230px" align="right" style="background-color:rgb(249,249,249); border: 1px solid rgb(153, 153, 153); padding: 1em; font-size:9pt">
<tr>
<tr>
<td>
<td>
*[http://www1.chapman.edu/%7Ejipsen/mathml/asciimath.html ASCIIMathML HomePage]
*[http://www.mozilla.org/projects/mathml/fonts/ Download Firefox fonts for MathML]
*[http://www.dessci.com/en/products/mathplayer/download.htm Download IE plugin for MathML]
</td>
</tr>
</table>
==ASCIIMathML.js (ver 2.0.9): Syntax and List of Constants==


====Introduction====
You can use your favorite editor to write HTML pages that use this JavaScript program. If the page is viewed by a browser that does not support MathML or JavaScript, the ASCII formulas are still quite readable. Most users will not have to read the technicalities on
The description of electrostatic acceleration as a result of spacetime curvature seems reasonable since the formulas for gravitational and electrostatic accelerations have exactly the same form, and this suggests that the latter are also produced by some kind of spacetime curvature. (Here we will avoid the term "force" since the impression of the existence of a force seems to be an artefact. Instead of saying that we have a force that produces an acceleration, it seems to be closer to reality to say that we have an acceleration that produces a force, or the impression of one.)
this page. If you type


The main difference between the two forms of acceleration, gravitational and electrostatic (besides the units and constants, and the difference in magnitude between the two accelerations), is the fact that in electrostatic acceleration we may have either attraction or repulsion.
<pre>\`x^2\` or \`a_(mn)\` or \`a_{mn}\` or \`(x+1)/y\` or \`sqrtx\`</pre>


<br />
you pretty much get what you expect: `x^2` or `a_(mn)` or `a_{mn}` or `(x+1)/y` or `sqrtx`. The choice of grouping parenthesis is up to you (they don't have to match either). If the displayed expression can be parsed uniquely without them, they are omitted. Printing the table of constant symbols (below) may be helpful (but is not necessary if you
<br />
know the LaTeX equivalents).


====An extra dimension====
It is hoped that this simple input format for MathML will further encourage its use on the web. The remainder of this page gives a fairly detailed specification of the ASCII syntax. <b>The expressions described here correspond to a wellspecified subset of Presentation MathML and behave in a predictable way.</b>
One way of producing such a phenomenon would be to assume that electrostatic acceleration is due to a curvature of the spaceline (the space dimension) not in relation to time, but in relation to an extra fifth dimension. I will try to describe things verbally, but there will be a simulation that will present this idea. (The idea is in the form of an initial working hypothesis that may need to be modified.)


Instead of having the spaceline curve in relation to the time dimension (which means that different points of the spaceline have different time coordinates; see [[Forms of Spacetime Curvature]] and [[Spacetime Curvature and Gravitation]]), we assume the existence of a third dimension (for a simple spacetime of one dimension of space and one of time) that is perpendicular to the other two. Then we can have the spaceline curve in relation to this dimension also, which means that different points will have different coordinates in relation to this dimension.
The syntax is very permissive and does not generate syntax errors. This allows mathematically incorrect expressions to be displayed, which is important for teaching purposes. It also causes less frustration when previewing formulas.


<br />
The parser uses no operator precedence and only respects the grouping brackets, subscripts, superscript, fractions and (square) roots. This is done for reasons of efficiency and generality. The resulting MathML code can quite easily be processed further to ensure additional syntactic requirements of any particular application.
<br />
<br>
<br>


====Positive and Negative Charge as Different Directions of Curvature====
==The grammar==
We can assume that the curvature in this dimension towards the one direction represents positive charge and towards the other the negative charge. We shall use the working term "electrostatic curvature" for this. When two particles with the same charge approach one another, the "depth" of the curvature must increase, and this seems to produce an acceleration away from one another, that is perceived as "repulsion". When two particles of opposite charge approach, the curvature towards the two directions cancels, and this seems to produce acceleration towards each other, which is perceived as "attraction".
Here is a definition of the grammar used to parse ASCIIMathML expressions. In the Backus-Naur form given below, the letter on the left of the ::= represents a category of symbols that could be one of the possible sequences of symbols listed on the right. The vertical bar | separates the alternatives.


<br />
<pre>c ::= [A-z] | numbers | greek letters | other constant symbols (see below)
<br />
u ::= 'sqrt' | 'text' | 'bb' |    other unary symbols for font commands
b ::= 'frac' | 'root' | 'stackrel' binary symbols
l ::= ( | [ | { | (: | {:          left brackets
r ::= ) | ] | } | :) | :}          right brackets
S ::= c | lEr | uS | bSS | "any"  simple expression
E ::= SE | S/S |S_S | S^S | S_S^S  expression (fraction, sub-, super-, subsuperscript)
</pre>
<br>
<br>
==The translation rules==
Each terminal symbol is translated into a corresponding MathML node. The constants are mostly converted to their respective Unicode symbols. The other expressions are converted
as follows:
<br/>


====Nature of the Extra Dimension====
<table>
Of course, in such a formulation we are faced with a question of what this dimension is exactly. It could be an additional dimension of space or an additional (second) dimension of time. The second case seems more probable, but we will have to see. If this proves correct, maybe light moves along the "second" time dimension only (see [[The Proper Time of Photons and the Nature of Light]]).
<tr><td>l`S`r</td><td>`to`</td><td><mrow>l`S`r</mrow>(note that any pair of brackets can be used to delimit subexpressions, they don't have to match)</td></tr>
<tr><td>sqrt `S`</td><td>`to`</td><td>&lt;msqrt>`S'`</msqrt></td></tr>
<tr><td>text `S`</td><td>`to`</td><td>&lt;mtext>`S'`</mtext></td></tr>
<tr><td>"any"</td><td>`to`</td><td>&lt;mtext>any&lt;/mtext></td></tr>
<tr><td>frac `S_1` `S_2`</td><td>`to`</td><td><mfrac>`S_1'` `S_2'`</mfrac></td></tr>
<tr><td>root `S_1` `S_2`</td><td>`to`</td><td><mroot>`S_2'` `S_1'`</mroot></td></tr>
<tr><td>stackrel `S_1` `S_2`</td><td>`to`</td><td><mover>`S_2'` `S_1'`</mover></td></tr>
<tr><td>`S_1`/`S_2`</td><td>`to`</td><td><mfrac>`S_1'` `S_2'`</mfrac></td></tr>
<tr><td>`S_1`_`S_2`</td><td>`to`</td><td><msub>`S_1` `S_2'`</msub></td></tr>
<tr><td>`S_1`^`S_2`</td><td>`to`</td><td><msup>`S_1` `S_2'`</msup></td></tr>
<tr><td>`S_1`_`S_2`^`S_3`</td><td>`to`</td><td><msubsup>`S_1` `S_2'` `S_3'`</msubsup> or <munderover>`S_1` `S_2'` `S_3'`</munderover> (in some cases)</td></tr>
</table>
In the rules above, the expression `S'` is the same as `S`, except that if
`S` has an outer level of brackets, then `S'` is the expression inside
these brackets.
<br>
<br>


A second question is, "If there is an extra dimension, why do we not see it?" This question seems reasonable, but maybe it is not. Why should it be considered certain that if there was an extra dimension we would be able to see it? There is also a scenario where the extra dimension exists, it is non-perceivable, and the fact that the perceivable dimensions curve within it produces a series of phenomena.
==Matrices:==
A simple syntax for matrices is also recognized:
<br/>
<tt>l(`S_(11)`,...,`S_(1n)`),(...),(`S_(m1)`,...,`S_(mn)`)r</tt>
&#x00A0; &#x00A0; or &#x00A0; &#x00A0;
<tt>l[`S_(11)`,...,`S_(1n)`],[...],[`S_(m1)`,...,`S_(mn)`]r</tt>.
<br/>


<br />
Here <tt>l</tt> and <tt>r</tt> stand for any of the left and right
<br />
brackets (just like in the grammar they do not have to match). Both of
these expressions are translated to
<br/>


====See also====
<mrow>l<mtable><mtr><mtd>`S_(11)`</mtd>...
*[[Forms of Spacetime Curvature]]
<mtd>`S_(1n)`<mtd></mtr>...
*[[Spacetime Curvature and Gravitation]]
<mtr><mtd>`S_(m1)`</mtd>...
<mtd>`S_(mn)`</mtd></mtr></mtable></mrow>.
<br/>


For example
<tt>{(S_(11),...,S_(1n)),(vdots,ddots,vdots),(S_(m1),...,S_(mn))]</tt>displays as `{(S_(11),...,S_(1n)),(vdots,ddots,vdots),(S_(m1),...,S_(mn))]`.
<br/>


Note that each row must have the same number of expressions, and there should be at least two rows.
<br>
<br>


[[Category:Electrostatic Forces and EM Waves]]
==Tokenization:==
The input formula is broken into tokens using a "longest matching initial substring search". Suppose the input formula has been processed from left to right up to a fixed position. The longest string from the list of constants (given below) that matches the initial part of the remainder of the formula is the next token. If there is no matching string, then the first character of the remainder is the next token. The symbol table at the top of the ASCIIMathML.js script specifies whether a symbol is a math operator (surrounded by a &lt;mo> tag) or a math identifier (surrounded by a &lt;mi> tag). For
single character tokens, letters are treated as math identifiers, and non-alphanumeric characters are treated as math operators. For digits, see "Numbers" below.


</td>
Spaces are significant when they separate characters and thus prevent a certain string of characters from matching one of the constants. Multiple spaces and end-of-line characters are equivalent to a single space.
<td>
<br>
{{Template:vp}}
<br>
{{Template:EM}}
 
</td>
==Complete list of constants==
([http://math.chapman.edu/cgi-bin/mathxml.pl?Complete_list_of_LaTeX_constants Standard LaTeX names] also work.)
 
Numbers: A string of digits, optionally preceded by a minus sign, and optionally followed by a decimal point (a period) and another string of digits, is parsed as a single token and converted to a MathML number, i.e., enclosed with the &lt;mn> tag. If it is not desirable to  have a preceding minus sign be part of the number, a space should be inserted. Thus tt>x-1</tt> is converted to &lt;mi>x&lt;/mi>&lt;mn>-1&lt;/mn>, whereas <tt>x - 1</tt> is converted to &lt;mi>x&lt;/mi>&lt;mo>-&lt;/mo>&lt;mn>1&lt;/mn>.
<br><br>
==Greek letters==
<table border="1" cellpadding="2" style="border: 1px solid #aaa; ">
<tr>
<td style="valign:top">
<table border="1" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><td border="1">alpha</td><td  border="1" align="center">`alpha`</td></tr>
<tr><td>beta</td><td align="center">`beta`</td></tr>
<tr><td>chi</td><td align="center">`chi`</td></tr>
<tr><td>delta</td><td align="center">`delta`</td></tr>
<tr><td>Delta</td><td align="center">`Delta`</td></tr>
<tr><td>epsilon</td><td align="center">`epsilon`</td></tr>
<tr><td>varepsilon</td><td align="center">`varepsilon`</td></tr>
<tr><td>eta</td><td align="center">`eta`</td></tr>
<tr><td>gamma</td><td align="center">`gamma`</td></tr>
</table>
</td>
<td style="valign:top">
<table border="1" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><td>Gamma</td><td align="center">`Gamma`</td></tr>
<tr><td>iota</td><td align="center">`iota`</td></tr>
<tr><td>kappa</td><td align="center">`kappa`</td></tr>
<tr><td>lambda</td><td align="center">`lambda`</td></tr>
<tr><td>Lambda</td><td align="center">`Lambda`</td></tr>
<tr><td>mu</td><td align="center">`mu`</td></tr>
<tr><td>nu</td><td align="center">`nu`</td></tr>
<tr><td>omega</td><td align="center">`omega`</td></tr>
<tr><td>Omega</td><td align="center">`Omega`</td></tr>
</table>
</td>
<td style="valign:top">
<table border="1" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><td>phi</td><td align="center">`phi`</td></tr>
<tr><td>varphi</td><td align="center">`varphi`</td></tr>
<tr><td>Phi</td><td align="center">`Phi`</td></tr>
<tr><td>pi</td><td align="center">`pi`</td></tr>
<tr><td>Pi</td><td align="center">`Pi`</td></tr>
<tr><td>psi</td><td align="center">`psi`</td></tr>
<tr><td>Psi</td><td align="center">`Psi`</td></tr>
<tr><td>rho</td><td align="center">`rho`</td></tr>
<tr><td>sigma</td><td align="center">`sigma`</td></tr>
</table>
</td>
<td style="valign:top">
<table border="1" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><td>Sigma</td><td align="center">`Sigma`</td></tr>
<tr><td>tau</td><td align="center">`tau`</td></tr>
<tr><td>theta</td><td align="center">`theta`</td></tr>
<tr><td>vartheta</td><td align="center">`vartheta`</td></tr>
<tr><td>Theta</td><td align="center">`Theta`</td></tr>
<tr><td>upsilon</td><td align="center">`upsilon`</td></tr>
<tr><td>xi</td><td align="center">`xi`</td></tr>
<tr><td>Xi</td><td align="center">`Xi`</td></tr>
<tr><td>zeta</td><td align="center">`zeta`</td></tr></table>
 
</td>
</tr>
</table>
 
 
<br><br>
 
==Symbols==
 
<table border="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr valign="top"><td style="border: 1px solid #aaa;" align="center">
'''Operation symbols'''</td><td style="border: 1px solid #aaa;" align="center">'''Relation symbols'''</td>
<td style="border: 1px solid #aaa;" align="center">
'''Logical symbols'''</td><td style="border: 1px solid #aaa;" align="center">'''Miscellaneous symbols'''</td>
<td style="border: 1px solid #aaa;" align="center">
'''Standard functions'''</td><td style="border: 1px solid #aaa;" align="center">'''Grouping brackets'''</td>
<td style="border: 1px solid #aaa;" align="center">
'''Accents'''</td><td style="border: 1px solid #aaa;" align="center">'''Font commands'''</td>
<td style="border: 1px solid #aaa;" align="center">
'''Arrows'''</td></tr>
<tr valign="top"><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;">+</td><td style="border: 1px solid #aaa;" align="center">`+`</td></tr>
<tr><td style="border: 1px solid #aaa">-</td><td style="border: 1px solid #aaa;" align="center">`-`</td></tr>
<tr><td style="border: 1px solid #aaa;" ><nowiki>*</nowiki></td><td style="border: 1px solid #aaa;" align="center">`*`</td></tr>
<tr><td style="border: 1px solid #aaa;" >**</td><td  style="border: 1px solid #aaa;" align="center">`**`</td></tr>
<tr><td style="border: 1px solid #aaa;" >//</td><td  style="border: 1px solid #aaa;" align="center">`//`</td></tr>
<tr><td style="border: 1px solid #aaa;" >\\</td><td  style="border: 1px solid #aaa;" align="center">`\\ `</td></tr>
<tr><td style="border: 1px solid #aaa;" >xx</td><td  style="border: 1px solid #aaa;" align="center">`xx`</td></tr>
<tr><td style="border: 1px solid #aaa;" >-:</td><td  style="border: 1px solid #aaa;" align="center">`-:`</td></tr>
<tr><td style="border: 1px solid #aaa;" >@</td><td  style="border: 1px solid #aaa;" align="center">`@`</td></tr>
<tr><td style="border: 1px solid #aaa;" >o+</td><td  style="border: 1px solid #aaa;" align="center">`o+`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ox</td><td  style="border: 1px solid #aaa;" align="center">`ox`</td></tr>
<tr><td style="border: 1px solid #aaa;" >o.</td><td  style="border: 1px solid #aaa;" align="center">`o.`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sum</td><td  style="border: 1px solid #aaa;" align="center">`sum`</td></tr>
<tr><td style="border: 1px solid #aaa;" >prod</td><td  style="border: 1px solid #aaa;" align="center">`prod`</td></tr>
<tr><td style="border: 1px solid #aaa;" >^^</td><td  style="border: 1px solid #aaa;" align="center">`^^`</td></tr>
<tr><td style="border: 1px solid #aaa;" >^^^</td><td  style="border: 1px solid #aaa;" align="center">`^^^`</td></tr>
<tr><td style="border: 1px solid #aaa;" >vv</td><td  style="border: 1px solid #aaa;" align="center">`vv`</td></tr>
<tr><td style="border: 1px solid #aaa;" >vvv</td><td  style="border: 1px solid #aaa;" align="center">`vvv`</td></tr>
<tr><td style="border: 1px solid #aaa;" >nn</td><td  style="border: 1px solid #aaa;" align="center">`nn`</td></tr>
<tr><td style="border: 1px solid #aaa;" >nnn</td><td  style="border: 1px solid #aaa;" align="center">`nnn`</td></tr>
<tr><td style="border: 1px solid #aaa;" >uu</td><td  style="border: 1px solid #aaa;" align="center">`uu`</td></tr>
<tr><td style="border: 1px solid #aaa;" >uuu</td><td  style="border: 1px solid #aaa;" align="center">`uuu`</td></tr>
</table>
</td><td style="border: 1px solid #aaa;" align="center">
<table border="1" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;" >
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;" >See</th></tr>
<tr><td style="border: 1px solid #aaa;" >=</td><td  style="border: 1px solid #aaa;" align="center">`=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >!=</td><td  style="border: 1px solid #aaa;" align="center">`!=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >< </td><td  style="border: 1px solid #aaa;" align="center">`<`</td></tr>
<tr><td style="border: 1px solid #aaa;" >></td><td  style="border: 1px solid #aaa;" align="center">`>`</td></tr>
<tr><td style="border: 1px solid #aaa;" ><=</td><td  style="border: 1px solid #aaa;" align="center">`<=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >>=</td><td  style="border: 1px solid #aaa;" align="center">`>=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >-<</td><td  style="border: 1px solid #aaa;" align="center">`-<`</td></tr>
<tr><td style="border: 1px solid #aaa;" >>-</td><td  style="border: 1px solid #aaa;" align="center">`>-`</td></tr>
<tr><td style="border: 1px solid #aaa;" >in</td><td  style="border: 1px solid #aaa;" align="center">`in`</td></tr>
<tr><td style="border: 1px solid #aaa;" >!in</td><td  style="border: 1px solid #aaa;" align="center">`notin`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sub</td><td  style="border: 1px solid #aaa;" align="center">`sub`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sup</td><td  style="border: 1px solid #aaa;" align="center">`sup`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sube</td><td  style="border: 1px solid #aaa;" align="center">`sube`</td></tr>
<tr><td style="border: 1px solid #aaa;" >supe</td><td  style="border: 1px solid #aaa;" align="center">`supe`</td></tr>
<tr><td style="border: 1px solid #aaa;" >-=</td><td  style="border: 1px solid #aaa;" align="center">`-=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >~=</td><td  style="border: 1px solid #aaa;" align="center">`~=`</td></tr>
<tr><td style="border: 1px solid #aaa;" >~~</td><td  style="border: 1px solid #aaa;" align="center">`~~`</td></tr>
<tr><td style="border: 1px solid #aaa;" >prop</td><td  style="border: 1px solid #aaa;" align="center">`prop`</td></tr>
</table>
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid #aaa; padding: 1em;">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;" align="center">See</th></tr>
<tr><td style="border: 1px solid #aaa">and</td><td style="border: 1px solid #aaa;" align="center">`and`</td></tr>
<tr><td style="border: 1px solid #aaa;" >or</td><td style="border: 1px solid #aaa;" align="center">`or`</td></tr>
<tr><td style="border: 1px solid #aaa;" >not</td><td style="border: 1px solid #aaa;" align="center">`not`</td></tr>
<tr><td style="border: 1px solid #aaa;" >=></td><td style="border: 1px solid #aaa;" align="center">`=>`</td></tr>
<tr><td style="border: 1px solid #aaa;" >if</td><td style="border: 1px solid #aaa;" align="center">`if`</td></tr>
<tr><td style="border: 1px solid #aaa;" >iff</td><td style="border: 1px solid #aaa;" align="center">`iff`</td></tr>
<tr><td style="border: 1px solid #aaa;" >AA</td><td style="border: 1px solid #aaa;" align="center">`AA`</td></tr>
<tr><td style="border: 1px solid #aaa;" >EE</td><td style="border: 1px solid #aaa;" align="center">`EE`</td></tr>
<tr><td style="border: 1px solid #aaa;" >_|_</td><td style="border: 1px solid #aaa;" align="center">`_|_`</td></tr>
<tr><td style="border: 1px solid #aaa;" >TT</td><td style="border: 1px solid #aaa;" align="center">`TT`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|--</td><td style="border: 1px solid #aaa;" align="center">`|--`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|==</td><td style="border: 1px solid #aaa;" align="center">`|==`</td></tr>
</table>
 
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >int</td><td style="border: 1px solid #aaa;" align="center">`int`</td></tr>
<tr><td style="border: 1px solid #aaa;" >oint</td><td style="border: 1px solid #aaa;" align="center">`oint`</td></tr>
<tr><td style="border: 1px solid #aaa;" >del</td><td style="border: 1px solid #aaa;" align="center">`del`</td></tr>
<tr><td style="border: 1px solid #aaa;" >grad</td><td style="border: 1px solid #aaa;" align="center">`grad`</td></tr>
<tr><td style="border: 1px solid #aaa;" >+-</td><td style="border: 1px solid #aaa;" align="center">`+-`</td></tr>
<tr><td style="border: 1px solid #aaa;" >O/</td><td style="border: 1px solid #aaa;" align="center">`O/`</td></tr>
<tr><td style="border: 1px solid #aaa;" >oo</td><td style="border: 1px solid #aaa;" align="center">`oo`</td></tr>
<tr><td style="border: 1px solid #aaa;" >aleph</td><td style="border: 1px solid #aaa;" align="center">`aleph`</td></tr>
<tr><td style="border: 1px solid #aaa;" >/_</td><td style="border: 1px solid #aaa;" align="center">`/_`</td></tr>
<tr><td style="border: 1px solid #aaa;" >:.</td><td style="border: 1px solid #aaa;" align="center">`:.`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|...|</td><td style="border: 1px solid #aaa;" align="center">|`...`|</td></tr>
<tr><td style="border: 1px solid #aaa;" >|cdots|</td><td style="border: 1px solid #aaa;" align="center">|`cdots`|</td></tr>
<tr><td style="border: 1px solid #aaa;" >vdots</td><td style="border: 1px solid #aaa;" align="center">`vdots`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ddots</td><td style="border: 1px solid #aaa;" align="center">`ddots`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|\ |</td><td style="border: 1px solid #aaa;" align="center">|`\ `|</td></tr>
<tr><td style="border: 1px solid #aaa;" >|quad|</td><td style="border: 1px solid #aaa;" align="center">|`quad`|</td></tr>
<tr><td style="border: 1px solid #aaa;" >diamond</td><td style="border: 1px solid #aaa;" align="center">`diamond`</td></tr>
<tr><td style="border: 1px solid #aaa;" >square</td><td style="border: 1px solid #aaa;" align="center">`square`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|__</td><td style="border: 1px solid #aaa;" align="center">`|__`</td></tr>
<tr><td style="border: 1px solid #aaa;" >__|</td><td style="border: 1px solid #aaa;" align="center">`__|`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|~</td><td style="border: 1px solid #aaa;" align="center">`|~`</td></tr>
<tr><td style="border: 1px solid #aaa;" >~|</td><td style="border: 1px solid #aaa;" align="center">`~|`</td></tr>
<tr><td style="border: 1px solid #aaa;" >CC</td><td style="border: 1px solid #aaa;" align="center">`CC`</td></tr>
<tr><td style="border: 1px solid #aaa;" >NN</td><td style="border: 1px solid #aaa;" align="center">`NN`</td></tr>
<tr><td style="border: 1px solid #aaa;" >QQ</td><td style="border: 1px solid #aaa;" align="center">`QQ`</td></tr>
<tr><td style="border: 1px solid #aaa;" >RR</td><td style="border: 1px solid #aaa;" align="center">`RR`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ZZ</td><td style="border: 1px solid #aaa;" align="center">`ZZ`</td></tr>
</table>
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >sin</td><td style="border: 1px solid #aaa;" align="center">`sin`</td></tr>
<tr><td style="border: 1px solid #aaa;" >cos</td><td style="border: 1px solid #aaa;" align="center">`cos`</td></tr>
<tr><td style="border: 1px solid #aaa;" >tan</td><td style="border: 1px solid #aaa;" align="center">`tan`</td></tr>
<tr><td style="border: 1px solid #aaa;" >csc</td><td style="border: 1px solid #aaa;" align="center">`csc`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sec</td><td style="border: 1px solid #aaa;" align="center">`sec`</td></tr>
<tr><td style="border: 1px solid #aaa;" >cot</td><td style="border: 1px solid #aaa;" align="center">`cot`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sinh</td><td style="border: 1px solid #aaa;" align="center">`sinh`</td></tr>
<tr><td style="border: 1px solid #aaa;" >cosh</td><td style="border: 1px solid #aaa;" align="center">`cosh`</td></tr>
<tr><td style="border: 1px solid #aaa;" >tanh</td><td style="border: 1px solid #aaa;" align="center">`tanh`</td></tr>
<tr><td style="border: 1px solid #aaa;" >log</td><td style="border: 1px solid #aaa;" align="center">`log`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ln</td><td style="border: 1px solid #aaa;" align="center">`ln`</td></tr>
<tr><td style="border: 1px solid #aaa;" >det</td><td style="border: 1px solid #aaa;" align="center">`det`</td></tr>
<tr><td style="border: 1px solid #aaa;" >dim</td><td style="border: 1px solid #aaa;" align="center">`dim`</td></tr>
<tr><td style="border: 1px solid #aaa;" >lim</td><td style="border: 1px solid #aaa;" align="center">`lim`</td></tr>
<tr><td style="border: 1px solid #aaa;" >mod</td><td style="border: 1px solid #aaa;" align="center">`mod`</td></tr>
<tr><td style="border: 1px solid #aaa;" >gcd</td><td style="border: 1px solid #aaa;" align="center">`gcd`</td></tr>
<tr><td style="border: 1px solid #aaa;" >lcm</td><td style="border: 1px solid #aaa;" align="center">`lcm`</td></tr>
<tr><td style="border: 1px solid #aaa;" >min</td><td style="border: 1px solid #aaa;" align="center">`min`</td></tr>
<tr><td style="border: 1px solid #aaa;" >max</td><td style="border: 1px solid #aaa;" align="center">`max`</td></tr>
</table>
 
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;" id="table1">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >(</td><td style="border: 1px solid #aaa;" align="center">`(`</td></tr>
<tr><td style="border: 1px solid #aaa;" >)</td><td style="border: 1px solid #aaa;" align="center">`)`</td></tr>
<tr><td style="border: 1px solid #aaa;" >[</td><td style="border: 1px solid #aaa;" align="center">`[`</td></tr>
<tr><td style="border: 1px solid #aaa;" >]</td><td style="border: 1px solid #aaa;" align="center">`]`</td></tr>
<tr><td style="border: 1px solid #aaa;" >{</td><td style="border: 1px solid #aaa;" align="center">`{`</td></tr>
<tr><td style="border: 1px solid #aaa;" >}</td><td style="border: 1px solid #aaa;" align="center">`}`</td></tr>
<tr><td style="border: 1px solid #aaa;" >(:</td><td style="border: 1px solid #aaa;" align="center">`(:`</td></tr>
<tr><td style="border: 1px solid #aaa;" >:)</td><td style="border: 1px solid #aaa;" align="center">`:)`</td></tr>
<tr><td style="border: 1px solid #aaa;" >{:</td><td style="border: 1px solid #aaa;" align="center">`{:`</td></tr>
<tr><td style="border: 1px solid #aaa;" >:}</td><td style="border: 1px solid #aaa;" align="center">`{::}`</td></tr>
</table>
 
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="width:70px; background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;" id="table2">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >hat x</td><td style="border: 1px solid #aaa;" align="center">`hat x`</td></tr>
<tr><td style="border: 1px solid #aaa;" >bar x</td><td style="border: 1px solid #aaa;" align="center">`bar x`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ul x</td><td style="border: 1px solid #aaa;" align="center">`ul x`</td></tr>
<tr><td style="border: 1px solid #aaa;" >vec x</td><td style="border: 1px solid #aaa;" align="center">`vec x`</td></tr>
<tr><td style="border: 1px solid #aaa;" >dot x</td><td style="border: 1px solid #aaa;" align="center">`dot x`</td></tr>
<tr><td style="border: 1px solid #aaa;" >ddot x</td><td style="border: 1px solid #aaa;" align="center">`ddot x`</td></tr>
</table>
 
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="width:70px; background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;" id="table3">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >bb A</td><td style="border: 1px solid #aaa;" align="center">`bb A`</td></tr>
<tr><td style="border: 1px solid #aaa;" >bbb A</td><td style="border: 1px solid #aaa;" align="center">`bbb A`</td></tr>
<tr><td style="border: 1px solid #aaa;" >cc A</td><td style="border: 1px solid #aaa;" align="center">`cc A`</td></tr>
<tr><td style="border: 1px solid #aaa;" >tt A</td><td style="border: 1px solid #aaa;" align="center">`tt A`</td></tr>
<tr><td style="border: 1px solid #aaa;" >fr A</td><td style="border: 1px solid #aaa;" align="center">`fr A`</td></tr>
<tr><td style="border: 1px solid #aaa;" >sf A</td><td style="border: 1px solid #aaa;" align="center">`sf A`</td></tr>
</table>
 
</td><td style="border: 1px solid #aaa;" align="center">
<table border="2" cellpadding="2" style="background-color:rgb(249,249,249); border-collapse: collapse; border: 1px solid rgb(153, 153, 153); padding: 1em;">
<tr><th style="border: 1px solid #aaa;" >Type</th><th style="border: 1px solid #aaa;">See</th></tr>
<tr><td style="border: 1px solid #aaa;" >uarr</td><td style="border: 1px solid #aaa;" align="center">`uarr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >darr</td><td style="border: 1px solid #aaa;" align="center">`darr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >rarr</td><td style="border: 1px solid #aaa;" align="center">`rarr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >-></td><td style="border: 1px solid #aaa;" align="center">`->`</td></tr>
<tr><td style="border: 1px solid #aaa;" >|-></td><td style="border: 1px solid #aaa;" align="center">`|->`</td></tr>
<tr><td style="border: 1px solid #aaa;" >larr</td><td style="border: 1px solid #aaa;" align="center">`larr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >harr</td><td style="border: 1px solid #aaa;" align="center">`harr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >rArr</td><td style="border: 1px solid #aaa;" align="center">`rArr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >lArr</td><td style="border: 1px solid #aaa;" align="center">`lArr`</td></tr>
<tr><td style="border: 1px solid #aaa;" >hArr</td><td style="border: 1px solid #aaa;" align="center">`hArr`</td></tr>
</table>
 
</td></tr>
</table>
 
<br><br>
 
==Examples==
 
<table border="1" cellpadding="2" style="border: 1px solid #aaa; background-color:rgb(249,249,249); ">
<tr>
<th style="border: 1px solid #aaa; width: 270px">Type this</th>
<th style="border: 1px solid #aaa; width: 150px">See that</th>
<th style="border: 1px solid #aaa;">Comment</th>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`x^2+y_1+z_12^34\`</td>
<td style="border: 1px solid #aaa;">`x^2+y_1+z_12^34`</td>
<td style="border: 1px solid #aaa;">subscripts as in TeX, but numbers are treated as a unit</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`sin^-1(x)\`</td>
<td style="border: 1px solid #aaa;">`sin^-1(x)`</td>
<td style="border: 1px solid #aaa;">function names are treated as constants</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h\`</td>
<td style="border: 1px solid #aaa;">`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h`</td>
<td style="border: 1px solid #aaa;">complex subscripts are bracketed, displayed under lim</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</td>
<td style="border: 1px solid #aaa;">[math]\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}[/math]</td>
<td style="border: 1px solid #aaa;">standard LaTeX notation is an alternative</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n\`</td>
<td style="border: 1px solid #aaa;">`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n`</td>
<td style="border: 1px solid #aaa;">f^((n))(a) must be bracketed, else the numerator is only `a`</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\f(x)=\\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n</td>
<td style="border: 1px solid #aaa;">[math]\f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n[/math]</td>
<td style="border: 1px solid #aaa;">standard LaTeX produces the same result</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`int_0^1f(x)dx\`</td>
<td style="border: 1px solid #aaa;">`int_0^1f(x)dx`</td>
<td style="border: 1px solid #aaa;">subscripts must come before superscripts</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`[[a,b],[c,d]]((n),(k))\`</td>
<td style="border: 1px solid #aaa;">`[[a,b],[c,d]]((n),(k))`</td>
<td style="border: 1px solid #aaa;">matrices and column vectors are simple to type</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`x/x={(1,if x!=0),(text{undefined},if x=0):}\`</td>
<td style="border: 1px solid #aaa;">`x/x={(1,if x!=0),(text{undefined},if x=0):}`</td>
<td style="border: 1px solid #aaa;">piecewise defined function are based on matrix notation</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`a//b\`</td>
<td style="border: 1px solid #aaa;">`a//b`</td>
<td style="border: 1px solid #aaa;">use // for inline fractions</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`(a/b)/(c/d)\`</td>
<td style="border: 1px solid #aaa;">`(a/b)/(c/d)`</td>
<td style="border: 1px solid #aaa;">with brackets, multiple fraction work as expected</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`a/b/c/d\`</td>
<td style="border: 1px solid #aaa;">`a/b/c/d`</td>
<td style="border: 1px solid #aaa;">without brackets the parser chooses this particular expression</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`((a*b))/c\`</td>
<td style="border: 1px solid #aaa;">`((a*b))/c`</td>
<td style="border: 1px solid #aaa;">only one level of brackets is removed; * gives standard product</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`sqrtsqrtroot3x\`</td>
<td style="border: 1px solid #aaa;">`sqrtsqrtroot3x`</td>
<td style="border: 1px solid #aaa;">spaces are optional, only serve to split strings that should not match</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`(:a,b:) and {:(x,y),(u,v):}\`</td>
<td style="border: 1px solid #aaa;">`(:a,b:) and {:(x,y),(u,v):}`</td>
<td style="border: 1px solid #aaa;">angle brackets and invisible brackets</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`(a,b]={x in RR : a < x <= b}\`</td>
<td style="border: 1px solid #aaa;">`(a,b]={x in RR : a < x <= b}`</td>
<td style="border: 1px solid #aaa;">grouping brackets don't have to match</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`abc-123.45^-1.1\`</td>
<td style="border: 1px solid #aaa;">`abc-123.45^-1.1`</td>
<td style="border: 1px solid #aaa;">non-tokens are split into single characters,<br/>
but decimal numbers are parsed with possible sign</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`hat(ab) bar(xy) ulA vec v dotx ddot y\`</td>
<td style="border: 1px solid #aaa;">`hat(ab) bar(xy) ulA vec v dotx ddot y`</td>
<td style="border: 1px solid #aaa;">accents can be used on any expression (work well in IE)</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)\`</td>
<td style="border: 1px solid #aaa;">`bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)`</td>
<td style="border: 1px solid #aaa;">font commands; can use any brackets around argument</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)\`</td>
<td style="border: 1px solid #aaa;">`stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)`</td>
<td style="border: 1px solid #aaa;">symbols can be stacked</td>
</tr>
<tr>
<td style="border: 1px solid #aaa;">\`{::}_(\ 92)^238U\`</td>
<td style="border: 1px solid #aaa;">`{::}_(\ 92)^238U`</td>
<td style="border: 1px solid #aaa;">prescripts simulated by subsuperscripts</td>
</tr>
</tr>
</table>
</table>
[[Category:Help]]

Revision as of 16:21, 12 October 2015

ASCIIMathML.js (ver 2.0.9): Syntax and List of Constants

You can use your favorite editor to write HTML pages that use this JavaScript program. If the page is viewed by a browser that does not support MathML or JavaScript, the ASCII formulas are still quite readable. Most users will not have to read the technicalities on this page. If you type

\`x^2\` or \`a_(mn)\` or \`a_{mn}\` or \`(x+1)/y\` or \`sqrtx\`

you pretty much get what you expect: `x^2` or `a_(mn)` or `a_{mn}` or `(x+1)/y` or `sqrtx`. The choice of grouping parenthesis is up to you (they don't have to match either). If the displayed expression can be parsed uniquely without them, they are omitted. Printing the table of constant symbols (below) may be helpful (but is not necessary if you know the LaTeX equivalents).

It is hoped that this simple input format for MathML will further encourage its use on the web. The remainder of this page gives a fairly detailed specification of the ASCII syntax. The expressions described here correspond to a wellspecified subset of Presentation MathML and behave in a predictable way.

The syntax is very permissive and does not generate syntax errors. This allows mathematically incorrect expressions to be displayed, which is important for teaching purposes. It also causes less frustration when previewing formulas.

The parser uses no operator precedence and only respects the grouping brackets, subscripts, superscript, fractions and (square) roots. This is done for reasons of efficiency and generality. The resulting MathML code can quite easily be processed further to ensure additional syntactic requirements of any particular application.

The grammar

Here is a definition of the grammar used to parse ASCIIMathML expressions. In the Backus-Naur form given below, the letter on the left of the ::= represents a category of symbols that could be one of the possible sequences of symbols listed on the right. The vertical bar | separates the alternatives.

c ::= [A-z] | numbers | greek letters | other constant symbols (see below)
u ::= 'sqrt' | 'text' | 'bb' |     other unary symbols for font commands
b ::= 'frac' | 'root' | 'stackrel' binary symbols
l ::= ( | [ | { | (: | {:          left brackets
r ::= ) | ] | } | :) | :}          right brackets
S ::= c | lEr | uS | bSS | "any"   simple expression
E ::= SE | S/S |S_S | S^S | S_S^S  expression (fraction, sub-, super-, subsuperscript)



The translation rules

Each terminal symbol is translated into a corresponding MathML node. The constants are mostly converted to their respective Unicode symbols. The other expressions are converted as follows:

l`S`r`to`<mrow>l`S`r</mrow>(note that any pair of brackets can be used to delimit subexpressions, they don't have to match)
sqrt `S``to`<msqrt>`S'`</msqrt>
text `S``to`<mtext>`S'`</mtext>
"any"`to`<mtext>any</mtext>
frac `S_1` `S_2``to`<mfrac>`S_1'` `S_2'`</mfrac>
root `S_1` `S_2``to`<mroot>`S_2'` `S_1'`</mroot>
stackrel `S_1` `S_2``to`<mover>`S_2'` `S_1'`</mover>
`S_1`/`S_2``to`<mfrac>`S_1'` `S_2'`</mfrac>
`S_1`_`S_2``to`<msub>`S_1` `S_2'`</msub>
`S_1`^`S_2``to`<msup>`S_1` `S_2'`</msup>
`S_1`_`S_2`^`S_3``to`<msubsup>`S_1` `S_2'` `S_3'`</msubsup> or <munderover>`S_1` `S_2'` `S_3'`</munderover> (in some cases)

In the rules above, the expression `S'` is the same as `S`, except that if `S` has an outer level of brackets, then `S'` is the expression inside these brackets.

Matrices:

A simple syntax for matrices is also recognized:
l(`S_(11)`,...,`S_(1n)`),(...),(`S_(m1)`,...,`S_(mn)`)r     or     l[`S_(11)`,...,`S_(1n)`],[...],[`S_(m1)`,...,`S_(mn)`]r.

Here l and r stand for any of the left and right brackets (just like in the grammar they do not have to match). Both of these expressions are translated to

<mrow>l<mtable><mtr><mtd>`S_(11)`</mtd>... <mtd>`S_(1n)`<mtd></mtr>... <mtr><mtd>`S_(m1)`</mtd>... <mtd>`S_(mn)`</mtd></mtr></mtable></mrow>.

For example {(S_(11),...,S_(1n)),(vdots,ddots,vdots),(S_(m1),...,S_(mn))]displays as `{(S_(11),...,S_(1n)),(vdots,ddots,vdots),(S_(m1),...,S_(mn))]`.

Note that each row must have the same number of expressions, and there should be at least two rows.

Tokenization:

The input formula is broken into tokens using a "longest matching initial substring search". Suppose the input formula has been processed from left to right up to a fixed position. The longest string from the list of constants (given below) that matches the initial part of the remainder of the formula is the next token. If there is no matching string, then the first character of the remainder is the next token. The symbol table at the top of the ASCIIMathML.js script specifies whether a symbol is a math operator (surrounded by a <mo> tag) or a math identifier (surrounded by a <mi> tag). For single character tokens, letters are treated as math identifiers, and non-alphanumeric characters are treated as math operators. For digits, see "Numbers" below.

Spaces are significant when they separate characters and thus prevent a certain string of characters from matching one of the constants. Multiple spaces and end-of-line characters are equivalent to a single space.

Complete list of constants

(Standard LaTeX names also work.)

Numbers: A string of digits, optionally preceded by a minus sign, and optionally followed by a decimal point (a period) and another string of digits, is parsed as a single token and converted to a MathML number, i.e., enclosed with the <mn> tag. If it is not desirable to have a preceding minus sign be part of the number, a space should be inserted. Thus tt>x-1 is converted to <mi>x</mi><mn>-1</mn>, whereas x - 1 is converted to <mi>x</mi><mo>-</mo><mn>1</mn>.

Greek letters

alpha`alpha`
beta`beta`
chi`chi`
delta`delta`
Delta`Delta`
epsilon`epsilon`
varepsilon`varepsilon`
eta`eta`
gamma`gamma`
Gamma`Gamma`
iota`iota`
kappa`kappa`
lambda`lambda`
Lambda`Lambda`
mu`mu`
nu`nu`
omega`omega`
Omega`Omega`
phi`phi`
varphi`varphi`
Phi`Phi`
pi`pi`
Pi`Pi`
psi`psi`
Psi`Psi`
rho`rho`
sigma`sigma`
Sigma`Sigma`
tau`tau`
theta`theta`
vartheta`vartheta`
Theta`Theta`
upsilon`upsilon`
xi`xi`
Xi`Xi`
zeta`zeta`




Symbols

Operation symbolsRelation symbols Logical symbolsMiscellaneous symbols Standard functionsGrouping brackets AccentsFont commands Arrows
TypeSee
+`+`
-`-`
*`*`
**`**`
//`//`
\\`\\ `
xx`xx`
-:`-:`
@`@`
o+`o+`
ox`ox`
o.`o.`
sum`sum`
prod`prod`
^^`^^`
^^^`^^^`
vv`vv`
vvv`vvv`
nn`nn`
nnn`nnn`
uu`uu`
uuu`uuu`
TypeSee
=`=`
!=`!=`
< `<`
>`>`
<=`<=`
>=`>=`
-<`-<`
>-`>-`
in`in`
!in`notin`
sub`sub`
sup`sup`
sube`sube`
supe`supe`
-=`-=`
~=`~=`
~~`~~`
prop`prop`
TypeSee
and`and`
or`or`
not`not`
=>`=>`
if`if`
iff`iff`
AA`AA`
EE`EE`
_|_`_|_`
TT`TT`
|--`|--`
|==`|==`
TypeSee
int`int`
oint`oint`
del`del`
grad`grad`
+-`+-`
O/`O/`
oo`oo`
aleph`aleph`
/_`/_`
:.`:.`
|...||`...`|
|cdots||`cdots`|
vdots`vdots`
ddots`ddots`
|\ ||`\ `|
|quad||`quad`|
diamond`diamond`
square`square`
|__`|__`
__|`__|`
|~`|~`
~|`~|`
CC`CC`
NN`NN`
QQ`QQ`
RR`RR`
ZZ`ZZ`
TypeSee
sin`sin`
cos`cos`
tan`tan`
csc`csc`
sec`sec`
cot`cot`
sinh`sinh`
cosh`cosh`
tanh`tanh`
log`log`
ln`ln`
det`det`
dim`dim`
lim`lim`
mod`mod`
gcd`gcd`
lcm`lcm`
min`min`
max`max`
TypeSee
(`(`
)`)`
[`[`
]`]`
{`{`
}`}`
(:`(:`
:)`:)`
{:`{:`
:}`{::}`
TypeSee
hat x`hat x`
bar x`bar x`
ul x`ul x`
vec x`vec x`
dot x`dot x`
ddot x`ddot x`
TypeSee
bb A`bb A`
bbb A`bbb A`
cc A`cc A`
tt A`tt A`
fr A`fr A`
sf A`sf A`
TypeSee
uarr`uarr`
darr`darr`
rarr`rarr`
->`->`
|->`|->`
larr`larr`
harr`harr`
rArr`rArr`
lArr`lArr`
hArr`hArr`



Examples

Type this See that Comment
\`x^2+y_1+z_12^34\` `x^2+y_1+z_12^34` subscripts as in TeX, but numbers are treated as a unit
\`sin^-1(x)\` `sin^-1(x)` function names are treated as constants
\`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h\` `d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` complex subscripts are bracketed, displayed under lim
\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} [math]\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}[/math] standard LaTeX notation is an alternative
\`f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n\` `f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n` f^((n))(a) must be bracketed, else the numerator is only `a`
\f(x)=\\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n [math]\f(x)=\sum_{n=0}^\infty\frac{f^{(n)}(a)}{n!}(x-a)^n[/math] standard LaTeX produces the same result
\`int_0^1f(x)dx\` `int_0^1f(x)dx` subscripts must come before superscripts
\`[[a,b],[c,d]]((n),(k))\` `[[a,b],[c,d]]((n),(k))` matrices and column vectors are simple to type
\`x/x={(1,if x!=0),(text{undefined},if x=0):}\` `x/x={(1,if x!=0),(text{undefined},if x=0):}` piecewise defined function are based on matrix notation
\`a//b\` `a//b` use // for inline fractions
\`(a/b)/(c/d)\` `(a/b)/(c/d)` with brackets, multiple fraction work as expected
\`a/b/c/d\` `a/b/c/d` without brackets the parser chooses this particular expression
\`((a*b))/c\` `((a*b))/c` only one level of brackets is removed; * gives standard product
\`sqrtsqrtroot3x\` `sqrtsqrtroot3x` spaces are optional, only serve to split strings that should not match
\`(:a,b:) and {:(x,y),(u,v):}\` `(:a,b:) and {:(x,y),(u,v):}` angle brackets and invisible brackets
\`(a,b]={x in RR : a < x <= b}\` `(a,b]={x in RR : a < x <= b}` grouping brackets don't have to match
\`abc-123.45^-1.1\` `abc-123.45^-1.1` non-tokens are split into single characters,
but decimal numbers are parsed with possible sign
\`hat(ab) bar(xy) ulA vec v dotx ddot y\` `hat(ab) bar(xy) ulA vec v dotx ddot y` accents can be used on any expression (work well in IE)
\`bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)\` `bb{AB3}.bbb(AB].cc(AB).fr{AB}.tt[AB].sf(AB)` font commands; can use any brackets around argument
\`stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)\` `stackrel"def"= or \stackrel{\Delta}{=}" "("or ":=)` symbols can be stacked
\`{::}_(\ 92)^238U\` `{::}_(\ 92)^238U` prescripts simulated by subsuperscripts