rpnlatex v1.4.2

User Guide

Scroll this text up and down with ↑ and ↓ (arrow keys), or j and k.

Close the user guide and return to the editor with q or Esc. Reopen the user guide at any time with ?.

The editor is divided into two sections: the stack and the document. The stack is where math expressions are built up; once you have built an expression on the stack that you want to keep, you can transfer it to the document for storage.

Expressions are entered using reverse Polish notation (RPN) which means that operands come before their operators. For example, to enter the expression a+b you would first type a then b followed by + to apply the addition operation.

The stack is displayed bottom-up; that is, the item most recently placed on the stack (called the "stack top") is the one shown at the bottom of the screen. The older items are stacked up above it. Editor operations always work with the first few items on the stack. In this user guide, the labels x, y and z are used to refer to these first few items.

Note that items on the stack have a small colored bar shown to the left of them. This indicates the item's size as well as its "type": usually a symbolic expression (grey) or a piece of text (blue).

This editor is designed to be operated entirely from the keyboard. Most operations are performed using single keystrokes or pairs of keystrokes (a prefix key followed by a subcommand key).

Invalid or unassigned key inputs are silently ignored. Other errors are signaled by a brief flash of the screen.

Several examples of how to create different math formulas are available at the end of this User Guide. You can jump directly to the examples by pressing x.

Single-Key Commands

  • ? Show this user guide. Typing ? a second time will "dock" the user guide into the document section for easier reference. While docked, the user guide can be scrolled with the ↑ ↓ arrow keys. Typing ? a third time will then close the user guide and reveal the document section again.

    NOTE: While the user guide popup is visible (and not docked), its font size can be adjusted with + and - (and reset with 0). This is in addition to the overall zoom level which can be set using the $ configuration commands described later.

  • a-z A-Z 0-9 Place a single letter or digit onto the stack.
  • + - < > * Join two expressions with the corresponding operator between them (x\cdot y in the case of *).
  •   (space) Concatenate the top two stack items. This can also be used to create longer integers from individual digits.
  • ^ or ` (backtick) Make superscript: x\enspace y \Rightarrow x^y
  • Enter Make subscript: x\enspace y \Rightarrow x_y
  • Backspace Drop the top item from the stack.
  • Shift Backspace Drop the secondmost top item from the stack.
  • ( [ { Enclose the stack top in paired delimiters: (x), [x], \{x\}. These delimiters automatically adjust to fit their contents.
  • ] Apply a bold font to the stack top.
  • ! Append a ! to the stack top (factorial notation).
  • ↑ ↓ (up+down arrows) Move the document selection indicator up or down.
  • ← → (left+right arrows) Scroll the stack panel left or right if the contents are too wide.
  • Shift ↑ Shift ↓ Shift the selected document item up or down within the document.
  • Shift ← Shift → Scroll the document panel left or right.
  • Shift Enter Start editing the stack top as text.

Prefix Keys

Most other commands require prefix keys to be typed first. These keys switch into a corresponding mode. The current mode is displayed in grey in the upper-right corner of the stack. Each mode has its own keymap of operations, which are detailed in the following sections.

NOTE: Typing the prefix keys below while this user guide is being shown will jump directly to the corresponding section. Backspace returns here to this list of prefixes. If the user guide is "docked" into the document area via ?? you can instead jump by using the Tab? prefix first.

  • \ Input a longer character string or formula with math entry mode.
  • " Create a text object with text entry mode.
  • Tab Stack manipulation and other utilities.
  • ' (apostrophe) Create standalone math symbols.
  • . (period) Add a decoration to the stack top.
  • , (comma) Combine two expressions with an infix operator.
  • = Combine two expressions with a relational operator.
  • / Apply various functions and operations.
  • /d  /D  /v Build different kinds of derivatives.
  • /i  /I Apply integral limits.
  • /f Apply named operators.
  • ) Add paired delimiters to an expression.
  • | Manipulate arrayed structures like matrices, vectors, or lists.
  • ~ Build tensor expressions using index notation.
  • _ Manipulate subexpressions with dissect mode.
  • # Perform symbolic algebra and calculus operations.
  • ; : Create Greek letters.
  • @ Create calligraphic-style uppercase letters: \mathcal{ABCDE}
  • & Create script-style uppercase letters: \mathscr{ABCDE}
  • % Create blackboard-style uppercase letters: \mathbb{ABCDE}
  • $ Change configuration settings.
  • Ctrl Some Control key shortcuts are also available.

\ Math Entry

The \ prefix starts math entry mode. A small input field will be shown where you can type a number or a simple math expression in traditional infix notation. Enter will parse what you have typed and put it on the stack. A malformed expression will signal an error; allowed expressions include:

  • Numbers such as 3, -10, 5.12
  • Single- or multi-letter variable or function names such as x, abc. Multi-letter variables are typeset in a roman (non-italic) font.
  • Greek letters may be spelled out and will be converted: pi \Rightarrow \pi
  • Subscripts may be written as: J_0 \Rightarrow J_0, x_alpha \Rightarrow x_\alpha
  • Infix expressions use the usual math syntax: x+2y-z. Supported are: +, -, *, / and ^ for powers; equations and comparisons may be written using: x=y, x!=y, x<y, x>y, x<=y, x>=y.
  • Multiplication by constants may be written implicitly (like 5x); for other multiplications an explicit space or * must be used between terms: write 5x*y*z or 5x y z instead of 5xyz
  • Parentheses may be used to indicate precedence: (x+1)/(x-1) \Rightarrow \displaystyle{\frac{x+1}{x-1}}
  • Function calls may be written as: f(x) or f[x]. Standard math functions like sin(x) can also be used.
  • Factorial notation (x!) is allowed.
  • Column vectors may be entered using square brackets: [x, y] and matrices with nested brackets: [[1, 2], [3, 4]].

Esc (or Ctrl z) will cancel math entry mode.

NOTE: The input field used here is very limited and supports only character entry along with arrow keys to move around, Backspace, Enter to finish your entry, and Esc to cancel entry. It is meant for entering short snippets of text; longer items should be created as pieces and assembled on the stack.

Plain Text Entry: Typing Shift Enter instead of Enter will typeset your entry in a roman (non-italic) font instead of the normal italic math font, and it will not be parsed as a math expression, so you can use any text you want. This can be used to include normal English words or phrases in math expressions. Placeholders can also be included by writing [].

NOTE: The conjunction command available via ,' is another way of including English words or phrases.

Named Operators: Typing Tab instead of Enter will typeset your entry as an operator name which behaves the same as built-in operators such as \lim and \sin. This gives extra spacing between anything concatenated to (or before) the operator name to match normal math notation. Only letters, numbers, spaces and dashes are allowed in operator names.

NOTE: The /f named operator prefix can also be used to create commonly-used named operators.

LaTeX Entry: Typing another \ after the first one will instead switch into LaTeX entry mode where you can enter an arbitrary zero-argument LaTeX command. This can be used to create any standard LaTeX symbol: \mathtt{\backslash\backslash boxdot}\Rightarrow\boxdot

One-argument LaTeX commands can be created using Shift Enter instead of Enter. The stack top becomes the argument: x^2 \Rightarrow \mathtt{\backslash\backslash utilde} \Rightarrow \utilde{x^2}

" Text Entry

The " prefix starts text entry mode which is similar to math entry but creates text objects. Text objects are shown with a blue bar to the left (instead of grey) and differ from normal math objects in some important ways:

  • They are meant for explanatory text, comments, etc., rather than being standalone math expressions. Therefore, they are not required to follow any particular math syntax.
  • They are shown in a roman (non-italic) font, left-justified (regardless of configuration settings), and will wrap around to multiple lines if needed.
  • Inline math expressions of the kind allowed in math entry mode can be included between pairs of $ signs (for example: $x+y$).
  • Placeholders can be included by writing [].
  • Text objects can be concatenated to other text objects or to math expressions using   (space) or combined via infix or relational operators.
  • Bold and italic words may be entered using **bold** and //italic// syntax.
  • Finishing the text entry with Shift Enter will create a section header instead (with a larger font and underline). You can later toggle whether or not the text object is a section header with the /" command.

Shift Enter Edit as Text

Expressions and text objects that were created with math entry or text entry modes may be brought back into the math or text entry editor for further editing with Shift Enter. Simple expressions like numbers and variables may also be editable even if they were not created with math/text entry mode.

Once an expression is modified or combined with other expressions, the result may no longer be editable as text this way. In this case, dissect mode may be helpful instead.

Tab Stack Manipulation and Utilities

This prefix has a variety of commands for managing the stack and the document, and other utilities.

Stack Operations: These commands manipulate the stack with traditional RPN operations. These can optionally take numeric prefix arguments which specify the number of stack items to operate on. Prefix arguments are entered by typing one or more digits after the Tab and before one of the following subcommand keys. Also, instead of a digit, * may be used to indicate that the operation should apply to the entire stack. For example, to reverse the entire stack you can type Tab*a. In the descriptions below, N refers to the prefix argument if given, otherwise the default is used.

  • Enter (Dup) Duplicate the top N items (default 1).
  • a (Swap) Reverse the order of the top N items (default 2).
  • d (Drop) Remove the top N items (default 1). Backspace can also be used by itself to drop single items from the stack instead of Tabd.
  • k (Keep) Remove all but the top N items (default 1).
  • n (Nip) Delete the Nth item from the top (default 2). Shift Backspace or Ctrl Backspace also do this.
  • o (Over) Put a copy of the Nth item from the top onto the stack (default 2).
  • r (Rotate) Move the Nth item from the top to the stack top (default 3).
  • t (Tuck) Copy the stack top into the Nth stack position (default 2).
  • u (Unrotate) Move the stack top to the Nth stack position (default 3).

Document Operations: These commands transfer items between the stack and the document. The document has a shaded selection indicator which you can move with the ↑ ↓ arrow keys (without using the Tab prefix). Shift ↑ and Shift ↓ will shift the selected item up or down within the document.

Items inserted into the document will be placed directly below the current selection. There is also a small margin at the top of the document that can be selected to insert items at the very top.

  • i Move N items (default 1) from the stack into the document at the current selection position.
  • j Move N items (default 1) from the document back onto the stack. If N is more than 1, items are taken from the current selection position and above, to match what i does.
  • I Copy N items (default 1) from the stack into the document at the current selection position without removing them from the stack.
  • J Copy N items (default 1) from the document back onto the stack without removing them from the document.
  • = Insert a separator (horizontal rule) into the document at the current selection position. A separator can also be created on the stack with '=.
  • l Recenter the document view around the current selection indicator.
  • ← → (left+right arrows) Scroll the document panel left or right if the contents are too wide. Shift ← and Shift → can also be used without the Tab prefix.

Utilities:

  • z Undo: Revert the stack and document back to the last state they were in. Ctrl z is a shortcut for this.
  • y Redo: Replay states that were previously undone.
  • c Copy the stack top into an internal clipboard slot. A prefix argument may optionally be entered to use a different slot than the default of 1 (e.g. Tab5c).
  • v Paste the item copied into a clipboard slot (with Tabc) onto the stack.
  • V Prompt for a string of LaTeX source code. This code will be put on the stack as a math expression if possible. Invalid LaTeX code will appear as a special error object.
  • w Move the stack top into a "floating" spot in the upper-right corner. This can be used to temporarily keep an item out of the way, or to pin it for quick reference. If there is already a floating item in this spot, it is put back on the stack instead.
  • f Open the File Manager (see below).
  • s Save the current document to browser storage.
  • X Clear the the entire stack and document.
  • ? If this user guide is "docked" into the document area via ??, this can be used to jump to the documentation section for a given prefix key. For example, Tab?= jumps to the section about relational operators.
  • ! Export document: Copy the document content to the clipboard as LaTeX text.
  • @ Export stack item(s): Copy the top N stack items (default 1) to the clipboard as LaTeX text.
  • $ Extract the LaTeX source of the top stack item as a "code" object.

Tabf File Management

Tabf opens the File Manager popup panel. If your browser supports it, you can save and manage separate documents in the internal browser storage (localStorage). Your data persists between browser sessions, but this may not work in Private/Incognito Mode. Each document has a filename but there is only one level of storage - no subfolders.

NOTE: You can use Tabs or Ctrl s from the main screen to save the current document without opening the file manager first.

Documents can be exported (downloaded) as .rpn files using the x command, and later re-imported by using the upload field found at the bottom of the File Manager.

' Math Symbols

Assorted standalone math symbols. Adding subscripts or superscripts to "large" symbols like \sum will place them in the correct position for normal math notation.

0 \varnothing 1 -1 2 \frac{1}{2} 3 1/2 8 \infty
a \forall A \aleph b \bullet c \cdot C \bigcap
d \partial D \bigoplus e \exists E \nexists h \hslash
i \int I \iint l \ell M \mp n \ne
o \circ O \bigodot p \prod P \pm q =
Q \bigsqcup r \square R \boxdot s \sum S \S
t \therefore U \bigcup v \vee V \bigvee w \wedge
W \bigwedge X \bigotimes y \oint Y \oiint . \dots
> \cdots - - + + * \ast ^ \star
| | ? ? ! ! , , ; ;
: : ` ` ~ \sim / / \ \backslash
_ \_ ↑ \uparrow ↓ \downarrow ← \leftarrow → \rightarrow
@ @ # \# $ \$ % \% & \&

Also available are:

  •   (space) Create a blank expression, which has no content of its own but can still be combined with other expressions as usual. A blank expression by itself will be displayed as \llbracket\mathsf{blank}\rrbracket until it's combined with something.
  • = Create a separator, a horizontal rule object which can be useful to visually separate parts of the document.
  • ' Create a placeholder. See the following section for more details.

Placeholders

Sometimes you may want to fill in part of an expression you are working on later, rather than including it immediately. You can insert a placeholder marker in your expression, and then later on substitute another expression where the placeholder is.

  • '' Put a placeholder \htmlClass{placeholder_expr}{\blacksquare} onto the stack. You can treat it like any other subexpression, applying operations to it and using it in other expressions. All placeholders are identical.
  • /' Substitute the stack top item for the placeholder in the item above it. If there is more than one placeholder, only the first one is substituted. Example: \sqrt{1 + \htmlClass{placeholder_expr}{\blacksquare}} \enspace x^2 \Rightarrow \sqrt{1+x^2}

. Decorations

These all modify a single item on the stack.

0 x_0 1 x^{-1} 2 x^2
3 x^3 4 x^4 8 x\to\infty
A \acute x (ácute) b \bold{x} (bold roman) c 1-x (complement)
d x^\dagger (dual/dagger) D x^\ddagger e \htmlClass{emphasized}{x} (emphasize)
g \mathring x (ring) G \grave x (gràve) h \hat x (hat)
H \widehat{x\dots} i x^{-} I x^{+}
k \mathfrak x (Fraktur) l x_\parallel (parallel) m \mathtt x (monospace)
M \mp x (minus-or-plus) n \bar x (overline) o \overline{x\dots} (overline)
p x_\perp (perpendicular) P \pm x (plus-or-minus) q = x (equals)
r \mathrm x (roman) s \mathsf x (sans-serif) S \mathsfit x (italic sans)
t \to x (to/therefore) T \longrightarrow x u \breve x
U \utilde{x\dots} v \vec x (vector) V \overrightharpoon{x\dots}
w \check x (check) W \widecheck{x\dots} x \boxed x (box)
X \sout x (crossout) Y \widetilde{x\dots} z \bcancel x
. \dot x > x. " \ddot x
  x\, (append space) ' x' , x^{\circ} (degrees)
* x^{*} ^ \star x = \Rightarrow x
- -x + +x ` x^\mathrm{T} (transpose)
~ \tilde x / \cancel x \ 1/x
[ \small x (smaller) ] \large x (larger) { \overbrace{x\dots}
} \underbrace{x\dots} ! \neg x (not) _ \underline{x\dots}
Tab \quad x (indent)

, Infix Operators

These commands combine the top two stack items by placing a mathematical operator between them.

a apply (see below) b x\bullet y c x\cap y
C x\circledcirc y d x^\dagger y D x\oplus y (direct sum)
e x,\dots,y f x\quad\mathrm{if}\quad y F x\quad\mathrm{iff}\quad y
g x\gets y (gets) G x\Leftarrow y j x\Join y (join)
k or | \left.x\,\middle\vert\,y\right. l x\parallel y m x\pmod y
M x\mp y n x\quad\mathrm{whe\mathbf{n}}\quad y o x\circ y (of)
O x\odot y p x\perp y P x\pm y
q x\quad\mathrm{and}\quad y Q x\quad\mathrm{or}\quad y r x\quad\mathrm{fo\mathbf{r}}\quad y
s or   x\,y S x\circledast y t x\to y
T x\longrightarrow y u x\cup y v x\vee y
V x\veebar y w x\wedge y (wedge) W x\barwedge y
x x\times y X x\otimes y = x\Rightarrow y
+ x\Longrightarrow y - x\ominus y . x\cdot y
, x,y ( \left(x,y\right) > x\cdots y
< \left\langle x,y\right\rangle * x*y ^ x\star y
: x\colon y ; x;y ` x^\mathrm{T} y
~ xy^\mathrm{T} / x/y \ x\backslash y
% x\div y Tab x\quad y _ x\_y
' conjunction (see below)

Apply: The ,a command takes three expressions from the stack, combining them into an infix expression. The stack top becomes the infix operator. For example: x\enspace y\enspace \circledast \Rightarrow x\circledast y

Conjunction: The ,' command is for combining two expressions with an English phrase between them, with some extra spacing. Several of these are already available via dedicated commands such as ,F which creates: x\quad\mathrm{iff}\quad y. This conjunction command starts a special text entry mode where you can type in whatever phrase you want instead. Using Enter creates an ordinary conjunction, while Shift Enter will make it bolded.

= Relational Operators

Similar to ,, these commands combine two expressions into an "equation" by placing a relational operator (or arrow) between them.

Equality-like relations:

a x\approx y (approx) c x\cong y (congruent)
e x\leftrightarrow y E x\longleftrightarrow y
f x\Leftrightarrow y F x\Longleftrightarrow y
i x\in y (in) I x\notin y
j x\leftarrow y J x\longleftarrow y
k x\Leftarrow y K x\Longleftarrow y
m x\mapsto y (maps to) M x\longmapsto y
n or ! x\ne y o x\circeq y
p x\propto y (proportional) P x\simeq y
q or = x = y Q x\equiv y (equivalent)
t x\to y (to) T x\longrightarrow y
v x\Rightarrow y V or + x\Longrightarrow y
; x\coloncolon y : x\coloneqq y
~ x\sim y . x\doteq y
^ x\triangleq y ? x\stackrel{?}{=} y
- x\vdash y | x\vDash y

Ordering relations:

l x < y g x > y
< or [ x\le y > or ] x\ge y
L x\ll y G x\gg y
{ x\lll y } x\ggg y
s x\subset y (subset) S x\subseteq y
u x\supset y (superset) U x\supseteq y

Variants of the above are available with the 2 subprefix:

2l x\prec y 2g x\succ y
2< or 2[ x\preceq y 2> or 2] x\succeq y
2L x\leqslant y 2G x\geqslant y
2s x\sqsubset y 2S x\sqsubseteq y
2u x\sqsupset y 2U x\sqsupseteq y

NOTE: "Negated" forms of relational operators can be created with the /! command. For example: x\subseteq y \Rightarrow x\not\subseteq y

/ Functions and Operators

This prefix has commands for building different kinds of expression structures and for applying common functions and operators.

Algebra and Calculus:

1 or \ x \Rightarrow \displaystyle{\frac{1}{x}} a or / x\enspace y \Rightarrow \displaystyle{\frac{x}{y}}
l x \Rightarrow \lim\limits_x L x\enspace y \Rightarrow \lim\limits_{x\to y}
b x\enspace y \Rightarrow \displaystyle{\binom{x}{y}} g x\enspace y \Rightarrow \displaystyle{\int_x^y}
= x\enspace y\enspace z \Rightarrow \displaystyle\sum_{x=y}^z + x\enspace y \Rightarrow \displaystyle\sum_{x\ge y}^{\phantom z}
q \sqrt{x} Q \sqrt[3]{x}
e \mathrm{e}^x E \exp x
n \ln{x} N \log{x}
2n \lg{x} 2N \log_2{x}
m \operatorname{Im} x M \operatorname{Re} x

Trigonometric Functions:

  • s \sin x  c \cos x  t \tan x 
  • S \sec x  C \csc x  T \cot x 
  • - inverse mode (see below)
  • h hyperbolic mode
  • 2 squared mode

Using - or h or 2 before the other trigonometric commands gives inverse, hyperbolic, and squared forms of the functions, respectively:

  • /-c x \Rightarrow \cos^{-1} x
  • /hT x \Rightarrow \coth x
  • /-hS x \Rightarrow \operatorname{sech}^{-1} x
  • /2t x \Rightarrow \tan^2 x

Function Application:

  • o f\enspace x \Rightarrow f(x)
  • r f\enspace x\enspace y \Rightarrow f(x,y)
  • R f\enspace x\enspace y\enspace z \Rightarrow f(x,y,z)
  • k f\enspace x\enspace y \Rightarrow f(x\,|\,y) ("konditional")
  • K f\enspace x\enspace y\enspace z \Rightarrow f(x,y\,|\,z)
  • [ f\enspace x \Rightarrow f[x]
  • ] f\enspace x \Rightarrow f\{x\}

NOTE: These commands should be used instead of simply concatenating the function name to its (parenthesized) argument(s) with  . The spacing is tighter to match normal function notation. Compare: f{\left(x\right)} vs. f\left(x\right). Other function call types can be created by first building an argument list such as x,y\,|\,z,w and then applying to f with /o.

Some common function application patterns can be created directly with Ctrl key shortcuts:

  • Ctrl x f\Rightarrow f(x)
  • Ctrl t f\Rightarrow f(t)
  • Ctrl f x\Rightarrow f(x)
  • Ctrl g x\Rightarrow g(x)

Vertical Stacking:

  • { x\enspace y \Rightarrow \overbrace{x}^y    } x\enspace y \Rightarrow \underbrace{x}_y
  • O x\enspace y \Rightarrow \overset{y}{x}    U x\enspace y \Rightarrow \underset{y}{x}

Probability and Statistics:

p x \Rightarrow \mathbb{P}{[x]} probability
P x\enspace y \Rightarrow \mathbb{P}{[x\,\vert\,y]} conditional probability
V x \Rightarrow \mathrm{Var}{[x]} variance
2V x\enspace y \Rightarrow \mathrm{Cov}[x,y] covariance
x x \Rightarrow \mathbb{E}{\left[x\right]} expectation
X x\enspace y \Rightarrow \mathbb{E}{\left[x\,\middle\vert\,y\right]} conditional expectation
y x\enspace y \Rightarrow \mathbb{E}_y{\left[x\right]} with subscript
Y x\enspace y\enspace z \Rightarrow \mathbb{E}_z{\left[x\,\middle\vert\,y\right]} conditional + subscript

NOTE: Variance, covariance, and probability are also available with the /f named operators prefix, in one- and two-argument forms.

Shortcuts and Utilities:

  •   x\enspace y \Rightarrow yx (prepend)
  • w Swap the parts of an expression. Infix or relational expressions swap their left and right sides, fractions swap numerator and denominator, tensors swap left and right indices, and subscripts are swapped with superscripts. Prefixed expressions like +x become x+ and vice-versa.
  • z "Dissolve" an expression, breaking it apart into its component parts if possible. Delimiters will be removed, fractions disassembled, and matrix elements put on the stack in row-major order.
  • | x\enspace y \Rightarrow \left.x\right\vert_{y}   "Where" notation, for example: \left.\frac{1}{\sqrt{1-x^2}}\right\vert_{x=1/2}
  • ^ x\enspace y \Rightarrow x\cdot{10}^y   Scientific notation, for example: 1.23\cdot{10}^{-4}
  • Enter x\enspace y\enspace z \Rightarrow x_y^z (shortcut for adding a subscript and superscript at once)
  • < or > Extract the left or right side of an infix or relational expression. The split will be based on the operator most recently used to create the infix expression. For fractions, the numerator or denominator is extracted.
  • ! "Negate" a relational operator by putting a slash through it. If already negated, the slash is removed instead (\subseteq \,\Leftrightarrow\, \not\subseteq). For infix expressions, the operator most recently used to create the expression is the one negated. Example: x≤y \Leftrightarrow x\nleq y
  • ' f(\htmlClass{placeholder_expr}{\blacksquare}) \enspace x \Rightarrow f(x) Substitute x for the first placeholder in an expression.
  • % x\enspace y\enspace z \Rightarrow x_{\textrm{new}}: Replace subexpressions within x matching y with a replacement z. Example: \sqrt{x^2+1}\enspace x\enspace (t-1) \Rightarrow \sqrt{(t-1)^2+1}
  • " Toggle whether the stack top is displayed as a section header.

Equation Splitting:

  • , Split a long equation across multiple lines. The stack top must be an expression just joined with an infix or relational operator. This command inserts a line break after the operator. A second application of this command to the same expression will change it to break before the operator instead, and a third will put it back to not having a line break. Further line breaks can be inserted after adding more terms and operators to the expression. Line breaks only affect the "top level" terms in an expression; expressions will not be broken inside of delimiters, etc.

Tags:

  • ; Prompt for a text string and attach it as a "tag" to the expression on the stack top. Tags can be used as equation numbers or labels and will be displayed to the right of the tagged item. Note that any further operations on a tagged item will remove the tag, so tags are generally added just before moving an item into the document.
  • NOTE: Using Shift Enter will automatically enclose the tag string in parentheses, useful for equation numbers like (1).

Subprefix Modes: These commands enter dedicated modes for other types of operations. These are described in the following sections.

  • d and D and v Subprefixes for building derivative expressions.
  • i Subprefix for applying integral limits.
  • f Subprefix for applying named operators.

/d  /D  /v Derivatives and Differentials

These are some shortcuts for quickly creating common types of expressions involving derivatives and differentials. The main commands here use the /d prefix; variants can be obtained with /D and /v (see below).

x x \Rightarrow \displaystyle{\frac{d}{dx}} X x \Rightarrow \displaystyle{\frac{d^2}{dx^2}}
y y\enspace x \Rightarrow \displaystyle{\frac{dy}{dx}} Y y\enspace x \Rightarrow \displaystyle{\frac{d^2 y}{dx^2}}
j y\enspace x \Rightarrow \displaystyle{\frac{\partial y}{\partial x}} J y\enspace x \Rightarrow \displaystyle{\frac{\partial^2 y}{\partial x^2}}
q x \Rightarrow \displaystyle{\frac{\partial}{\partial x}} Q x \Rightarrow \displaystyle{\frac{\partial^2}{\partial x^2}}
m x\enspace y \Rightarrow \displaystyle{\frac{\partial^2}{\partial x\,\partial y}} M f\enspace x\enspace y \Rightarrow \displaystyle{\frac{\partial^2 f}{\partial x\,\partial y}}
p x \Rightarrow \partial x P x\enspace y \Rightarrow \partial_y x
g x \Rightarrow \nabla x G x\enspace y \Rightarrow \nabla_y x
. x \Rightarrow \nabla\cdot x > x \Rightarrow x\cdot\nabla
c x \Rightarrow \nabla\times x C x \Rightarrow x\times\nabla
l x \Rightarrow \nabla^2 x (Laplacian) n x \Rightarrow \Delta x (increment)
d x \Rightarrow dx 2 x \Rightarrow d^2 x
3 x \Rightarrow d^3 x 4 x \Rightarrow d^4 x
f x\enspace y \Rightarrow dx \wedge dy F x\enspace y\enspace z \Rightarrow dx \wedge dy \wedge dz
i or   x\enspace y \Rightarrow x\,dy

Differential Forms: The d 2 3 4 f F commands for building differential forms will pull out minus signs as needed, as in: -y\enspace x \Rightarrow -dy \wedge dx. Differential forms concatenated with other expressions automatically receive some extra spacing to match traditional math notation: \int x^2\,dx, \int dx\,x^2, \int dx, \int f(x,y)\,dx\wedge dy.

The i or   commands can be used to immediately create a differential and concatenate it to an existing integral expression, for example: x \Rightarrow \int x^2\,dx.

NOTE: Higher-order differential forms can be created by joining with ,w (wedge): dx\wedge dy\wedge dz,\, dw \Rightarrow dx\wedge dy\wedge dz\wedge dw

Alternative Notation: Some authors prefer an upright Roman-font "d" when writing differentials. For example: \frac{\mathrm{d}y}{\mathrm{d}x} instead of \frac{dy}{dx}. This can be done by using the /D prefix instead of /d.

Variational Calculus: Functional derivative operations from the calculus of variations may be entered with the /v prefix. The partial derivative commands from /d are available, the only difference being \partial becomes \delta. Example: /dj \to \frac{\partial f}{\partial x} but /vj \to \frac{\delta f}{\delta x}.

/i  /I Integral Limits

These commands are for quickly applying common limits to integral signs. The /i prefix applies limits to an existing integral sign (or other expression) on the stack, while /I creates the integral sign and the limits in a single command.

r \Rightarrow \int_{-\infty}^\infty reals
R \Rightarrow \int_{\mathcal{R}} alternative notation for reals
p \Rightarrow \int_0^\infty positive
n \Rightarrow \int_{-\infty}^0 negative
u \Rightarrow \int_0^1 unit
U \Rightarrow \int_{-1}^1 symmetric unit
t \Rightarrow \int_0^{2\pi} trigonometric
T \Rightarrow \int_{-\pi}^\pi symmetric trigonometric

/f Named Operators

These commands apply named operators like \max to the stack top. The argument(s) may or may not be automatically parenthesized, depending on the traditional usage of the operator.

a \arg x c \mathrm{Cov}[x] C \mathrm{Cov}[x,y]
d \det x D \dim x e \operatorname{erf}{(x)}
E \operatorname{erfc}{(x)} g \gcd{(x,y)} G \deg x
h \hom x i \inf x I \liminf x
k \ker x l \lim x m \min x
M \argmin x n \operatorname{sgn}{(x)} (sign) p \Pr x
P \Pr{(x,y)} s \sup x S \limsup x
t \operatorname{Tr} x (trace) v \mathrm{Var}[x] V \mathrm{Var}[x,y]
x \max x X \argmax x

NOTE: Arbitrarily-named operators can be created with math entry mode by finishing the entry with Tab.

) Delimiters

These commands enclose expressions in various kinds of delimiter pairs. The delimiters automatically expand to fit the size of their contents.

Note that the most commonly-used delimiters are available directly as ( [ { without needing a prefix key.

b \left\langle x\right\vert (Dirac bra) c \left\lceil x\right\rceil (ceiling) d \llbracket x\rrbracket
f \left\lfloor x\right\rfloor (floor) g \left\lgroup x\right\rgroup (grouped) i \left\langle x\,\middle\vert\,y\right\rangle (inner product)
I \left\langle x\,\middle\vert\,y\,\middle\vert\,z\right\rangle k \left\vert x\right\rangle (Dirac ket) m \left\lmoustache x\right\rmoustache
n or N \left\lVert x\right\rVert (norm) o \left(x\right] (half-open) O \left[x\right)
w or W \left. x\right\vert (where) | \left\vert x\right\vert (abs) < \left\langle x\right\rangle
( \left( x\right. ) \left. x\right) [ \left[ x\right.
] \left. x\right] { \left\{ x\right. } \left. x\right\}
. or   blank (see below)

Certain infix operators, when enclosed in delimiters, will also adjust to fit the size of the delimiters. These operators are:

x\,\vert\,y created by ,k or ,|
x\parallel y created by ,l
x/y created by ,/
x\backslash y created by ,\

Because of this, you can give these operators a flexible size anywhere by using blank delimiters via ). or ) . For example: \displaystyle x/\frac{1}{\sqrt x} \Rightarrow \left.x\middle/\frac{1}{\sqrt x}\right.

Other commands in this mode:

  • F Change the existing delimiters of the stack top to be of fixed size rather than expanding to fit their contents.
  • x or X Remove delimiters from the stack top if it has any.
  • l or L Alter the left delimiter of the stack top.
  • r or R Alter the right delimiter of the stack top.

These last two commands l and r change an existing delimiter, or add a new one if none is present. After entering one of these commands, select the delimiter type from one of the following:

< \left\langle\right. > \left.\right\rangle ( \left(\right. ) \left.\right)
[ \left[\right. ] \left.\right] { \left\{\right. } \left.\right\}
g \left\lgroup\right. G \left.\right\rgroup m \left\lmoustache\right. M \left.\right\rmoustache
n \left.\right\Vert c \left\lceil\right. C \left.\right\rceil f \left\lfloor\right.
F \left.\right\rfloor | \left.\right| / \left.\right/ \ \left.\right\backslash
. or   \left.\right. (blank)

| Array Operations

These commands are for building and manipulating arrayed structures like matrices, vectors and lists.

NOTE: Several of these commands take required prefix arguments to indicate the number of items to work on. These are entered by typing one or more digits after the | key and before the subcommand key. For example, to build a matrix row with 3 columns you can type |3(. This prefix argument is referred to as N in the descriptions below.

Matrix Row Building: These commands assemble N items from the stack into a 1\times N row matrix with the indicated bracket type.

(\;\begin{pmatrix}a & b & c\end{pmatrix} [\;\begin{bmatrix}a & b & c\end{bmatrix} {\;\begin{Bmatrix}a & b & c\end{Bmatrix}
v\;\begin{vmatrix}a & b & c\end{vmatrix} V\;\begin{Vmatrix}a & b & c\end{Vmatrix} m or   \;\begin{matrix}a & b & c\end{matrix}

A column matrix can be entered by first building a row matrix, then transposing with |T.

To change the bracket type of an existing matrix on the stack, use |t followed by one of the type keys above. For example |t{ changes the matrix to have curly braces.

Full Matrix Building: An entire matrix may also be assembled at once from the stack with elements in row-major order with the x command. This takes a prefix argument indicating the number of rows, then switches into a new mode expecting the number of columns, followed by one of the matrix row building keys above to indicate the matrix type.

For example, to build a 2\times 3 matrix from 6 elements on the stack, with square brackets, enter: |2x3[.

There are some shortcuts available for building common matrix and vector types:

$ a\enspace b\enspace c\enspace d\Rightarrow \begin{bmatrix} a & b \\ c & d \end{bmatrix}
@ a\enspace b\Rightarrow \begin{bmatrix} a \\ b \end{bmatrix} # a\enspace b\enspace c\Rightarrow \begin{bmatrix} a \\ b \\ c\end{bmatrix}

Matrix Manipulation: These commands operate on existing matrices.

  • E Insert spaces and dots before the last row and column in a matrix, in order to notate a matrix that is not fully written out.
  • T Transpose a matrix by exchanging its rows and columns.
  • s Split a matrix into its component rows, putting each row onto the stack. To split by columns instead, use the T transpose command first.
  • | or Enter Stack N matrices (or other aligned structures) on top of each other (default 2). All must have the same number of columns. This is the main way to build matrices from individual rows.
  • h Stack N matrices horizontally (default 2). All must have the same number of rows.

Row and Column Separators: These commands place separator lines between rows or columns of a matrix. If lines are already there they will be removed instead. A prefix argument may be used to specify which row or column the separator is to be placed after, otherwise the first row or column will be used. A * prefix argument will apply separator lines to all rows or columns at once.

  • ! Place a solid line between columns.
  • : Place a dashed line between columns.
  • - Place a solid line between rows.
  • _ Place a dashed line between rows.

Alignment Building: These commands group multiple expressions into "aligned" structures of various types. Like the matrix row building operations, these also take a required prefix argument indicating how many items to combine.

  • a (align) Stack N equations together aligned by their infix operator, if any.
  • g (gather) Stack N equations together where each equation is centered on its own.
  • c (case) Build a list of N cases for a piecewise function definition. If the component items are infix expressions joined with a colon (via ,:), they will be split up and placed as the left and right parts of the case structure. For example:
    \begin{gathered} x^2 \colon x \ge 0 \\ 0 \colon x < 0 \end{gathered} \Longrightarrow \begin{cases} x^2 & x \ge 0 \\ 0 & x < 0 \end{cases}
  • C Same as the above, but the brace is on the right instead of the left.
  • f and F Same as c and C, but prepend the word "if" to the right-hand side of expressions joined with a colon. If there is no colon, the right-hand side becomes the word "otherwise" instead. For example:
    \begin{gathered} x^2 \colon x \ge 1 \\ x^3 \colon 0 \le x \le 1 \\ x^4 \end{gathered} \Longrightarrow \begin{cases} x^2 & \mathrm{if}\enspace x \ge 1 \\ x^3 & \mathrm{if}\enspace 0 \le x \le 1 \\ x^4 & \mathrm{otherwise} \end{cases}

List Building: These commands build concatenated lists from individual items. As before, the number of items to concatenate must be given as a prefix argument.

  • , x_1,x_2,x_n
  • . x_1,x_2,\dots,x_n
  • e x_1,x_2,x_n,\dots (ellipsis)
  • ; x_1;\,x_2;\,x_n
  • + x_1 + x_2 + \cdots + x_n
  • p x_1 + x_2 + x_n + \cdots (plus)

Miscellaneous:

  • k Build a substack object used for adding multiple subscripts or superscripts to a large operator such as \sum. Place the resulting object as the subscript or superscript of the operator and they will be lined up in a stack underneath or above.

~ Tensors

These commands are for building and manipulating tensors using index notation. This is similar to normal subscript and superscript notation, but with the following differences:

  • Using these commands creates a tensor base to which upper and lower indices can be attached, representing the contravariant and covariant axes of the tensor.
  • Multiple indices may be attached to the same tensor base, and will stack horizontally next to each other rather than becoming nested as in the case of repeated superscripts and subscripts. For example: \displaystyle{x^{yz}} vs. \displaystyle{x^{y^z}}.
  • Indices are positioned according to the order they are attached, with correct spacing to indicate the axis ordering. For example, \displaystyle{\Gamma^{i}_{\hphantom{i}jk}} and \displaystyle{\Gamma^{ij}_{\hphantom{ij}k}} have distinct mathematical meanings, but would both appear as \displaystyle{\Gamma^{ij}_k} using ordinary subscripts and superscripts.
  • Tensor indices may also be attached to the left side of the tensor base, allowing notation such as \displaystyle{\vphantom{\Gamma}^a_b \Gamma}. (This can be used to create chemical symbols like \displaystyle{\vphantom{\mathrm{Pu}}^{239}_{\hphantom{239}}{\mathrm{Pu}}}.)
  • ` or ^ Add an upper (contravariant) index to a tensor: \Gamma\enspace x \Rightarrow \displaystyle{\Gamma^x}
  • _ or Enter Add a lower (covariant) index: \Gamma\enspace x \Rightarrow \displaystyle{\Gamma_x}
  • i or   Add lower and upper indices at once; they will share an axis slot: \Gamma\enspace x\enspace y \Rightarrow \displaystyle{\Gamma_{x}^{y}}
  • . Affix ellipses (\,\cdots\,) to the outermost indices. Ellipses will not be added next to blank index slots. For example: \displaystyle{\Gamma_a^b} \Rightarrow \displaystyle{\Gamma^{b\,\cdots\,}_{a\,\cdots\,}}, but \displaystyle{\Gamma^{\hphantom{a}b}_{a\hphantom{b}}} \Rightarrow \displaystyle{\Gamma^{\hphantom{a}b\,\cdots\,}_{a\hphantom{b}\hphantom{\,\cdots\,}}}
  • , Similar to . but affix commas instead. This is for creating expressions like \displaystyle{\Gamma^{a\hphantom{b}\hphantom{,}\hphantom{c}}_{\hphantom{a}b,c}}
  • l or ~ Switch to left mode. After switching, the previous commands will add indices to the left side of the tensor instead, e.g. \Gamma\enspace x \Rightarrow \displaystyle{\vphantom{\Gamma}^x \Gamma}
  • c Condense indices by moving them towards the tensor base, closing up any empty slots: \displaystyle{\vphantom{\Gamma}^{\hphantom{a}bc}_{a\hphantom{b}\hphantom{c}}\Gamma^{\hphantom{d}e}_{d\hphantom{e}}} \Rightarrow \displaystyle{\vphantom{\Gamma}^{bc}_{\hphantom{b}a}\Gamma^e_d}
  • w Swap the type (upper or lower) of all tensor indices: \displaystyle{\Gamma^a_{\hphantom{a}bc}} \Leftrightarrow \displaystyle{\Gamma_a^{\hphantom{a}bc}}

NOTE: The main /w (swap) command also works on tensors and swaps the left indices with the right indices.

_ Dissect

Entering dissect mode with _ (underscore) allows selecting and manipulating subexpressions of the stack top. This can be useful to copy out a part of an existing expression, or to replace a part with something else.

NOTE: These commands operate on the internal tree structure of expressions. Generally, the tree structure will reflect the way the expression was originally created, but there is no particular guarantee of this. Some ways of building expressions can flatten tree structure or change it in unexpected ways.

Once dissect mode is entered, the currently-selected subexpression will be highlighted in a special way and framed with an overbrace to show what is selected. The following commands will then be available:

  • ] or } or → Move the selection to its nearest "sibling" to the right, if available.
  • [ or { or ← Move the selection to the left instead.
  • _ or ↓ Descend further into the tree structure, if possible. The leftmost subexpression will be selected.
  • u or U or ↑ Ascend the tree structure if possible, selecting a larger expression containing the current selection. Note that the top-level expression itself as a whole cannot be selected.
  • x or X or ' Extract the currently selected subexpression, replacing it with a placeholder. The extracted subexpression will be left on the stack top, where it can be further manipulated or replaced with normal commands, and then re-substituted back into the original expression using /'.
  • d or D or Backspace Delete the currently selected subexpression, replacing it with a placeholder. Same as x, but the selected subexpression is not left on the stack.
  • c or C Copy the currently selected subexpression. Same as x, but a placeholder is not inserted (the original expression is left unmodified).
  • t or T Trim down to the currently selected subexpression. Same as x, but only the selected subexpression is left on the stack.
  • q or Q or Esc Cancel out of dissect mode.

# Symbolic Algebra

These commands perform symbolic algebra and calculus operations on expressions using the Algebrite library.

Most of these commands come in two varieties: lowercase letters try to guess the appropriate variable to use in the operation (for example, \displaystyle{y^2 - 1} uses y), while uppercase letters require the variable to be specified explicitly.

NOTE: Algebrite is a relatively simple and lightweight computer algebra system, so not everything can be expected to work. It's also easy to perform operations that are too large or time-consuming, such as expanding (x+1)^{10000}, and the Algebrite library itself has some bugs, so be careful using these commands and make sure to save your work. There is no way to interrupt a long-running computation other than closing the browser tab itself.

Algebra:

  • # "Run" an expression through Algebrite, evaluating any indicated operations like 5^2 and performing default simplifications such as combining like terms.
  • x and X Expand a polynomial or rational function, rewriting with partial fractions if possible: \displaystyle{ \frac{{\left(x+3\right)}^2}{\left(x+1\right)\left(x+2\right)} \Rightarrow 1+\frac{4}{x+1}-\frac{1}{x+2}}
  • f and F Factor a polynomial over the integers: \displaystyle{ x^3-1 \Rightarrow \left(x-1\right)\left(x^2+x+1\right)} . Applied to a literal integer, factor into primes instead: 123456 \Rightarrow 2^6\cdot 3\cdot 643
  • c and C Complete the square in an expression by rewriting in a way that eliminates the term linear in a variable: 2x^2-3x+1 \Rightarrow 2{\left(x-\frac{3}{4}\right)}^2-\frac{1}{8} . Any extra terms like x^3 or \sin x are left alone.
  • r Rationalize an expression by putting everything over a common denominator: \displaystyle{ \frac{1}{x+1}+\frac{1}{x-1}\Rightarrow\frac{2x}{\left(x-1\right)\left(x+1\right)}}
  • s Attempt to rewrite an expression in a simpler form: \displaystyle{ \frac{\left(x+2\right)!}{x!} \Rightarrow \left(x+1\right)\left(x+2\right)}
  • w and W (where) Substitute a value for a variable in an expression: w x^2\enspace 10 \Rightarrow 100 or W x+y\enspace y\enspace 10 \Rightarrow x+10. Note that with W, the "variable" can be any arbitrary expression: 3\mathrm{e}^x\enspace \mathrm{e}^x\enspace y\Rightarrow 3y.
  • e Rewrite trigonometric functions using exponentials: \displaystyle{ \sin{x} \Rightarrow \frac{i{\mathrm e}^{-2ix}}{2}-\frac{i{\mathrm e}^{2ix}}{2}}
  • P and R Rewrite a complex value in P polar or R rectangular form: \displaystyle{ {\mathrm e}^{i\pi/3} \Leftrightarrow \frac{1}{2}+\frac{i\sqrt{3}}{2}}
  • * Complex conjugation: \displaystyle{ {\mathrm e}^{2ix}\Rightarrow{\mathrm e}^{-2ix}}
  • z and Z Find the (real or complex) exact roots of a polynomial if possible. Multiple roots are displayed as a list: x^2+2 \Rightarrow \begin{aligned} x_1 & {}=-i\sqrt{2}\\ x_2 & {}=i\sqrt{2} \end{aligned}
  • m f\enspace a\enspace b \Rightarrow \displaystyle{\sum_{x=a}^b f{(x)}} or M f\enspace x\enspace a\enspace b \Rightarrow \displaystyle{\sum_{x=a}^b f{(x)}}: Sum f{(x)} for values of the variable ranging from a to b; a and b must be finite integers.
  • o f\enspace a\enspace b \Rightarrow \displaystyle{\prod_{x=a}^b f{(x)}} or O f\enspace x\enspace a\enspace b \Rightarrow \displaystyle{\prod_{x=a}^b f{(x)}}: Product of f{(x)} values.

Calculus:

  • d and D Differentiate an expression: \displaystyle{x^2\sin{x} \Rightarrow 2x\sin{x}+x^2\cos{x}}. Generic functions like f{(x)} can also be handled and are shown with "prime" notation: \displaystyle{ xf{\left(x\right)} \Rightarrow f{\left(x\right)}+xf^{\prime}{\left(x\right)}}
  • i and I Attempt to calculate the indefinite integral of an expression: \displaystyle{ 2\sin{x}\cos{x} \Rightarrow {\left(\sin{x}\right)}^2}
  • j f\enspace a\enspace b \Rightarrow \int_a^b f{(x)}\,dx: Attempt to calculate a definite integral. The integration bounds can be symbolic expressions or rational numbers. Currently, numerical integration (quadrature) is not supported, and the integration bounds must be finite. Example: \displaystyle{ \tan x \enspace 0 \enspace \pi/3 \Rightarrow \ln 2}
  • J f\enspace z\enspace a\enspace b \Rightarrow \int_a^b f{(z)}\,dz: Specify the integration variable explicitly.
  • t and T Expand a function in Taylor series. Lowercase t performs a default expansion about x=0 to order 7: \displaystyle{ \sin{2x} \Rightarrow -\frac{8x^7}{315}+\frac{4x^5}{15}-\frac{4x^3}{3}+2x} . Uppercase T takes 4 arguments on the stack: f\enspace x\enspace a\enspace n and calculates the expansion about f(x=a) to order n.

Linear Algebra:

These operations are performed by applying the usual math syntax to matrices or vectors created with the | commands. Evaluating the expression with ## will then execute the matrix or vector operation(s).

NOTE: the matrices or vectors must be "literal" matrices, not generic variables like M. However, they can contain symbolic expressions as their elements.

  • A\cdot B or AB: Matrix product. A row vector times a column vector yields the inner product (a scalar), while a column vector times a row vector yields the outer product (a rank-1 matrix).
  • A + B or A - B: Matrix or vector sum or difference.
  • A^{-1}: Matrix inverse: {\begin{bmatrix}a & b\\c & d\end{bmatrix}}^{-1} \Rightarrow \begin{bmatrix} \frac{d}{ad-bc} & -\frac{b}{ad-bc}\\ -\frac{c}{ad-bc} & \frac{a}{ad-bc} \end{bmatrix}
  • A^n: Matrix power (n integer).
  • A^{\mathrm{T}}: Matrix/vector transpose. NOTE: the |T command also performs transpose directly.
  • \det A: Determinant /fd of a square matrix: \det{\begin{bmatrix}a & b\\c & d\end{bmatrix}} \Rightarrow ad-bc
  • \operatorname{Tr} A: Trace /ft of a square matrix: \operatorname{Tr}{\begin{bmatrix}a & b\\c & d\end{bmatrix}} \Rightarrow a+d

Numerical Operations:

  • = Evaluate constants in an expression, replacing them with decimal approximations: (\ln{2})^3 \Rightarrow 0.333024651
  • / Given a decimal number, try to find a close rational approximation to that number. Rational factors of values like \pi and \sqrt{3} can also be detected: 1.644934066 \Rightarrow \pi^2/6
  • y and Y Numerically find all (real or complex) roots of a polynomial.
  • q and Q Check whether an equation or inequality like x^2 > \sin x is true or not. The expression will be evaluated randomly at several points sampled from \mathcal{N}(\mu=0,\sigma=10) to test for likely truth or falsehood. Q f\enspace\mu\enspace\sigma allows you to specify the mean and standard deviation \mathcal{N}(\mu,\sigma) explicitly.
  • v Compute numerical eigenvalues of a matrix. The matrix must be real, symmetric, and contain only numeric values (no symbols). A diagonal matrix containing the eigenvalues is returned.
  • V Compute numerical eigenvectors of a matrix. A matrix containing the eigenvectors as its columns is returned.

Special Functions:

These commands generate special functions and polynomials that occur frequently in mathematics. They require the subprefix key p to be pressed first. The resulting generated functions always use x as the variable (though this can be changed to something else using the #w command).

  • pp n \Rightarrow P_n{(x)}: Legendre polynomial of degree n.
  • pP n\enspace m \Rightarrow P_n^m{(x)}: Associated Legendre function of order (n,m).
  • pl n \Rightarrow L_n{(x)}: Laguerre polynomial of degree n.
  • pL n\enspace m \Rightarrow L_n^{(m)}{(x)}: Associated Laguerre polynomial of order (n,m).
  • ph n \Rightarrow H_n{(x)}: Hermite polynomial of degree n. These use the "physicist's" scaling convention.
  • pj \alpha \Rightarrow J_{\alpha}{(x)}: Bessel function of the first kind.
  • py \alpha \Rightarrow Y_{\alpha}{(x)}: Bessel function of the second kind.

; : Greek Letters

NOTE: Either : or ; may be used to create these letters; they behave identically.

Lowercase Greek letters:

a \alpha b \beta c \xi d \delta e \epsilon
f \phi g \gamma h \eta i \iota j \varphi
k \kappa l \lambda m \mu n \nu o \omega
p \pi q \vartheta r \rho s \sigma t \tau
u \upsilon v \theta w \omega x \chi y \psi
z \zeta

Uppercase Greek letters (and some variants):

C \Xi D \Delta E \varepsilon F \Phi
G \Gamma H \mho (mho) K \varkappa L \Lambda
M \varpi N \nabla (nabla) O \Omega P \Pi
Q \Theta R \varrho S \Sigma T \varsigma
U \Upsilon V \Theta W \Omega Y \Psi

Italic-slanted variants of uppercase Greek letters are also available using the ;2 prefix:

2C \varXi 2D \varDelta 2F \varPhi 2G \varGamma
2L \varLambda 2O \varOmega 2P \varPi 2Q \varTheta
2S \varSigma 2U \varUpsilon 2V \varTheta 2Y \varPsi

NOTE: The sequence ;; can be used as an alternative to ,; to join two expressions with a semicolon, and ;: joins with a colon like ,:.

$ Configuration

These commands let you change global configuration settings. The settings are saved between sessions in your browser.

  • ↑ ↓ ← → Switch the position of the stack panel relative to the document panel.
  • s Set the percentage of the window width (or height) that the stack panel will occupy. The percentage is given by the prefix argument: $0s to $9s for 0% to 90%, or $*s for 100%. Default is 50%.
  • + or z Increase the text zoom factor in steps of 5%. A prefix argument can be used to jump up multiple steps at once. A prefix argument of * or 0 resets the zoom factor back to the default.
  • - or Z Decrease the text zoom factor.
  • m Change the alignment of math expressions in the stack area. Cycles between left-aligned (the default), centered, and right-aligned.
  • M Like m but for the document area instead.
  • i Toggle between full-size math display (the default) and compact inline math display modes. With inline display mode, equations are always aligned to the left, regardless of the setting chosen by $m and $M. Long equations will wrap around to multiple lines in inline display mode, while full-size mode requires the use of the /, equation splitting command to insert line breaks.
  • f Enter fullscreen mode if your browser supports it. F exits fullscreen.
  • H Toggle whether or not to hide the mouse cursor.
  • I Toggle whether the prefix key mode indicator in the upper-right corner of the stack is visible or not.
  • V Toggle inverse video or "dark" mode (by inverting all colors).
  • E Toggle E-ink mode, which adjusts some colors and styling to improve display on E-ink devices.
  • S Toggle sepia color filter. NOTE: inverse video, E-ink, and sepia modes are all mutually exclusive.
  • r Reset all the configuration settings to their initial defaults.
  • R Force a page reload (restarting the app).
  • ) Disable autoparenthesization. Normally, parentheses are inserted automatically by certain operations where they are unambiguously required. For example, concatenating a+b and c+d yields (a+b)(c+d). $) disables this behavior to yield a+bc+d instead.
  • ( Re-enable the default autoparenthesization behavior.

Control Keys

For maximum browser compatibility, Control/Alt/Command keys are not required. However, the following Control key based shortcuts are available for optional use. On macOS, the Command key also functions as an alias to Control.

NOTE: Pressing c while the User Guide popup is open will take you directly to this section.

  • Ctrl 0-4 Add common subscripts and superscripts: x_0, x^{-1}, x^2, x^3, x^4 – same as .0-4
  • Ctrl a Swap the top two stack top items – same as Taba
  • Ctrl b Apply a bold font: x\Rightarrow \boldsymbol x – same as ]
  • Ctrl c Copy stack top to clipboard – same as Tabc
  • Ctrl d Make subscript – same as Enter
  • Ctrl e x \Rightarrow \mathrm{e}^x – same as /e
  • Ctrl f x \Rightarrow f(x)
  • Ctrl g x \Rightarrow g(x)
  • Ctrl i Move the stack top into the document at the current selection position – same as Tabi
  • Ctrl j Move the current document selection back onto the stack – same as Tabj
  • Ctrl k f\enspace x\enspace y \Rightarrow f(x\,|\,y) – same as /k
  • Ctrl l Recenter the document view around the current document selection – same as Tabl
  • Ctrl m x \Rightarrow -x – same as .-
  • Ctrl n Apply a roman font: x\Rightarrow \mathrm x – same as .r
  • Ctrl o f\enspace x \Rightarrow f(x) – same as /o
  • Ctrl p Enclose the stack top in parentheses – same as (
  • Ctrl r f\enspace x\enspace y \Rightarrow f(x,y) – same as /r
  • Ctrl s Save the current document – same as Tabs
  • Ctrl t f \Rightarrow f(t)
  • Ctrl u Make superscript – same as ` or ^
  • Ctrl v Paste clipboard to stack top – same as Tabv
  • Ctrl w Put the stack top into a temporary "floating" spot, or put it back on the stack again – same as Tabw
  • Ctrl x f \Rightarrow f(x)
  • Ctrl z Undo last action – same as Tabz
  • Ctrl y Redo actions undone by 'undo' – same as Taby
  • Ctrl / x\enspace y \Rightarrow \displaystyle{\frac{x}{y}} – same as //
  • Ctrl \ x \Rightarrow \displaystyle{\frac{1}{x}} – same as /1
  • Ctrl ] Apply a bold roman font: (x\Rightarrow \bold x) – same as .b
  • Ctrl , Join two items with a comma – same as ,,
  • Ctrl Space Join two items with a thin space – same as , 
  • Ctrl Backspace Drop the secondmost top item from the stack – same as Tabn

Examples

Key-by-key examples of how to create some different math formulas. You can follow along more easily by docking this User Guide into the document area by pressing ? again.

Beta function

\displaystyle{B{\left(\alpha,\beta\right)}=\int^1_0{\left(1-t\right)}^{\alpha-1}t^{\beta-1}\,dt}

  • B;a;b/r \Rightarrow B{\left(\alpha,\beta\right)}
  • /Iu \Rightarrow \int_0^1
  • t.c;a1-` \Rightarrow \left(1-t\right)^{\alpha-1}
  • t;b1-` \Rightarrow t^{\beta-1}
  •   t/di \Rightarrow \int^1_0{\left(1-t\right)}^{\alpha-1}t^{\beta-1}\,dt
  • == \Rightarrow B{\left(\alpha,\beta\right)}=\int^1_0{\left(1-t\right)}^{\alpha-1}t^{\beta-1}\,dt

Schrödinger equation

\displaystyle{i\hslash\frac{\partial\Psi}{\partial t}=-\frac{\hslash^2}{2m}\nabla^2\Psi+\phi\Psi}

  • i'h ;Yt/dj  \Rightarrow i\hslash\frac{\partial\Psi}{\partial t}
  • 'h.22m //.-;Y/dl  \Rightarrow -\frac{\hslash^2}{2m}\nabla^2\Psi
  • ;f;Y +== \Rightarrow i\hslash\frac{\partial\Psi}{\partial t}=-\frac{\hslash^2}{2m}\nabla^2\Psi+\phi\Psi

Sine power series

\displaystyle{\sin{\omega t}=\sum_{k\ge0}{\left(-1\right)}^k\frac{{\left(\omega t\right)}^{2k+1}}{\left(2k+1\right)!}}

  • ;wt /s \Rightarrow \sin{\omega t}
  • k0/+'1k` \Rightarrow \sum_{k\ge0}{\left(-1\right)}^k
  • ;wt 2k 1+` \Rightarrow {\left(\omega t\right)}^{2k+1}
  • 2k 1+!// \Rightarrow \frac{{\left(\omega t\right)}^{2k+1}}{\left(2k+1\right)!}
  •   == \Rightarrow \sin{\omega t}=\sum_{k\ge0}{\left(-1\right)}^k\frac{{\left(\omega t\right)}^{2k+1}}{\left(2k+1\right)!}

Fourier transform

\displaystyle{\mathscr{F}{\left[\phi\right]}=\hat{\phi}{\left(k\right)}=\frac{1}{\sqrt{2\pi}}\int^{\infty}_{-\infty}\phi{\left(x\right)}{\mathrm{e}}^{-ikx}\,dx}

  • &F;f/[;f.hk/o== \Rightarrow \mathscr{F}{\left[\phi\right]}=\hat{\phi}{\left(k\right)}
  • 2;p /q/1 \Rightarrow \frac{1}{\sqrt{2\pi}}
  • /Ir;fx/o  \Rightarrow \int^{\infty}_{-\infty}\phi{\left(x\right)}
  • ikx  .-/e x/di \Rightarrow \int^{\infty}_{-\infty}\phi{\left(x\right)}{\mathrm{e}}^{-ikx}\,dx
  •  == \Rightarrow \mathscr{F}{\left[\phi\right]}=\hat{\phi}{\left(k\right)}=\frac{1}{\sqrt{2\pi}}\int^{\infty}_{-\infty}\phi{\left(x\right)}{\mathrm{e}}^{-ikx}\,dx

Cauchy integral formula

\displaystyle{f^{\left(n\right)}{\left(z_0\right)}=\frac{n!}{2\pi i}\oint\frac{f{\left(z\right)}\,dz}{{\left(z-z_0\right)}^{n+1}}}

  • fn(`z.0/o \Rightarrow f^{\left(n\right)}{\left(z_0\right)}
  • n!2;p i // \Rightarrow \frac{n!}{2\pi i}
  • 'yfz/oz/dizz.0-n1+`//  \Rightarrow \oint\frac{f{\left(z\right)}\,dz}{{\left(z-z_0\right)}^{n+1}}
  •  == \Rightarrow f^{\left(n\right)}{\left(z_0\right)}=\frac{n!}{2\pi i}\oint\frac{f{\left(z\right)}\,dz}{{\left(z-z_0\right)}^{n+1}}

Multivariate Gaussian distribution

\displaystyle{f{\left(\boldsymbol{x}\right)}=\frac{1}{\sqrt{{\left(2\pi\right)}^n\det{\boldsymbol{\Sigma}}}}\exp{\left[-\frac{1}{2}{\left(\boldsymbol{x}-\boldsymbol{\mu}\right)}^{\mathrm{T}}{\boldsymbol{\Sigma}}^{-1}\left(\boldsymbol{x}-\boldsymbol{\mu}\right)\right]}}

  • 2;p n`;S]/fd /q/1 \Rightarrow \frac{1}{\sqrt{{\left(2\pi\right)}^n\det{\boldsymbol{\Sigma}}}}
  • '2.-x];m]-;S]'1`Tabo ,`  \Rightarrow -\frac{1}{2}{\left(\boldsymbol{x}-\boldsymbol{\mu}\right)}^{\mathrm{T}}{\boldsymbol{\Sigma}}^{-1}\left(\boldsymbol{x}-\boldsymbol{\mu}\right)
  • [/E fx]/oTaba== \Rightarrow f{\left(\boldsymbol{x}\right)}=\frac{1}{\sqrt{{\left(2\pi\right)}^n\det{\boldsymbol{\Sigma}}}}\exp{\left[-\frac{1}{2}{\left(\boldsymbol{x}-\boldsymbol{\mu}\right)}^{\mathrm{T}}{\boldsymbol{\Sigma}}^{-1}\left(\boldsymbol{x}-\boldsymbol{\mu}\right)\right]}