Demo

$\mathrm{\LaTeX\ Output}$
Output LaTeX Code
Output Sage Code
Output Syntax Tree

Instructions

The toolbars above are just for your convenience; there are multiple alternatives for many of the symbol and operator token. For example, the "not equal" relation can be written as <> (from SQL), != (traditional), or /= (from Haskell). The language is designed to be intuitive, so feel free to experiment. Try finding all six keywords for "proper superset".

Enter a mathematical expression and watch the rendering and parse tree evolve as you type. Please note that no LaTeX/AST output will be rendered until a successful parse. To help maximize the frequency of successful parses, the Lexer will attempt to fix unmatched delimiters as you type. Also note that some delimiters have more than one formate either with or without colons. Namely, absolute value can be written as | ... | or |: ... :|, norm can be written as || ... ||, or ||: ... :||, and vector literals can be surrounded by either < ... > or <: ... :>. Delimiters without colons are context-aware in that they have different meanings other than as delimiters and therefore cannot be automatically matched by the Lexer. Additionally, if an expression is opened with one type of delimiter, it must be closed with the same type (i.e. context-aware vs. specialized).

Sample Inputs

Click on an expression below to use it as the mathematical input above.