Demo Editor is an app demonstrating capabilities of a modern typesetter capable of handling math equations.
Demo Editor uses a TeX-like syntax for the input equation. The typesetter can render most equations describable with TeX. The input parser however is experimental and limited to a subset of TeX commands. The following describes the syntax of an input text for the editor.
The editor follows almost the same general rules for parsing as TeX. Specifically,
{^{pre}f^{}^2_1_ _3}".All single-character macros defined by Plain TeX are supported. These include support to greek letters (e.g. \alpha), letter-like sumbols (e.g. \imath, math symbols (e.g. \mapsto) and more.
More macros can be defined using \def command. The syntax is similar to TeX.
The following TeX commands are supported, with their usual meaning: sqrt, frac, matrix, bf, it, rm, quad, sin, lim.
In addition command root is defined. This command takes two arguments. The first one is the radical's index, and the second one its base. For example, "\root3n" represents the third root of n (in TeX, this would be "\root3 \of n").
x=\frac{-b\mp\sqrt{b^2-4ac}}{2a}{\bf A \times B}=[\matrix{3 & 5 \cr 4 & 1}]∫_0^ℏ{5α^4\rm dα} = {α^5}|_0^ℏ
\matrix{3x&+&2y&+&z&=&5x\prime&-&3y\prime\cr
&&2y&+&z&=&2x\prime}}
\int_0^1{\frac{5y^2}{\sin(y)}dy}=
{\def\xvec{(x_1,\ldots,x_n)}
\lim_{n\rightarrow\infty}(\sum_{\xvec\ne(0,\ldots,0)} (f\xvec + g\xvec))}In text editors that support pdf files (like TextEdit, Mail, Pages and Word), you can convert texts to an equation using the service available from Services menu. (Note: this requires re-login after installing the app. Also, you might need to enable this from System Preferences/Keyboard Shortcuts/Services.)