rpnlatex v1.3.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.

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": 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.

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.
  • a-zA-Z0-9*~ Place the corresponding character onto the stack.
  • +-<> Join two expressions with the corresponding operator between them.
  •   (space) Concatenate the top two stack entries.
  • ^ or ` (backtick) Make superscript: x\enspace y \to x^y
  • Enter Make subscript: x\enspace y \to x_y
  • Shift+Enter Start editing the stack top as text.
  • Backspace Drop the 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.
  • Shift+↑Shift+↓ (shift+up/down) Shift the selected document item up or down within the document.
  • ←→ (left/right arrows) Scroll the stack panel left or right if the contents are too wide.
  • Shift+←Shift+→ (shift+left/right) Scroll the document panel left or right.

Prefix Keys

All other operations 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. (This does not apply if the user guide is "docked" into the documents section via ??.)

  • \ 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 items with an infix operator.
  • = Combine two items with a relational operator.
  • / Apply various functions and operators.
  • /d Build different kinds of derivatives.
  • /i Apply integral limits.
  • /f Create named operators.
  • ) Add paired delimiters to the stack top.
  • | Manipulate arrayed structures like matrices, vectors, or lists.
  • _ Manipulate subexpressions with dissect mode.
  • # Numerically evaluate expressions.
  • ; Insert lowercase Greek letters.
  • : Insert uppercase Greek letters.
  • @ Insert calligraphic-style uppercase letters: \mathcal{ABCDE}
  • & Insert script-style uppercase letters: \mathscr{ABCDE}
  • % Insert 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 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-letter variables such as x.
  • Implicit multiplication such as 5x or xy (interpreted as multiplying x and y).
  • Infix operators such as x+2y. Allowed operators are: +-/* (but not ^).
  • Full-size fractions via double slash: 2//3 \to\frac{2}{3}.
  • Scientific notation such as 3e-4 (converts to 3\times{10}^{-4}).
  • Placeholders via the sequence [].
  • @ can be used to create a \pi symbol, as a special case. For example: 1//2@i \to \frac{1}{2\pi i}.
  • ' can be used to add one or more "prime" superscripts: x^{\prime\prime}.
  • ! for factorial notation (x!) is allowed.
  • Expressions can be parenthesized, e.g. (x+y). Square brackets and curly braces may also be used, but they have to be properly matched.

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, and Esc to cancel text 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 still be included using [].
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.

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. For example: \\boxdot \to\boxdot

One-argument LaTeX commands can be created using Shift+Enter instead of Enter. For example: x\\utildeShift+Enter \to\utilde{x}

" 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 and will wrap around to multiple lines if needed.
  • They can be concatenated with other text objects or with math expressions using   (space) or combined via infix or relational operators. Math expressions combined with text objects this way become part of the text and are displayed in a more compact inline format.
  • 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.
  • Bold and italic words may be entered using **bold** and //italic// syntax.
  • Short inline math expressions of the kind allowed in math entry mode can be included between pairs of $ symbols (for example: $x+y$). This syntax is limited, so more complex expressions can be included by using [] for a placeholder and filling in the expression later.

Shift+Enter Edit Text

Some simple math or text objects, including those entered with math entry or text entry modes, may be brought back into the math or text entry editor for further editing with Shift+Enter.

NOTE: Only sufficiently simple objects are editable this way; once further operations are performed they may no longer be editable. 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).
  • 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.
  • 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.
  • 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:

  • Tab Undo: Revert the stack and document back to the last state they were in. Ctrl+z is a shortcut for this.
  • . 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.
  • f Open the File Manager (see below).
  • s Save the current document to browser storage.
  • X Clear the the entire stack and document.
  • ! 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 special 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 (IndexedDB). 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.

The Export/Import section of the file manager allows you to download your document storage as a .zip file for backup purposes, and to restore your storage from a previously-saved .zip file. The .zip file will contain one file per document, in JSON text format.

To download a .zip archive, click the 'Prepare Export' link; this will build the archive from your browser's storage and then present you a download link.

You can also export individual documents as .json files using the x command, and import them with the file upload field.

' Math Symbols

Assorted standalone math symbols. These all put exactly one object onto the stack.

0 \varnothing 1 -1 2 \frac{1}{2} 3 1/2 8 \infty
a \forall b \bullet c \cdot C \bigcap d \partial
e \exists E \nexists h \hslash i \int I \iint
l \ell M \mp n \ne o \circ p \prod
P \pm q = s \sum t \therefore U \bigcup
v \vee V \bigvee w \wedge W \bigwedge y \oint
Y \oiint . \dots > \cdots - - + +
* \star | | ? ? ! ! , ,
; ; : : ` ` / / \ \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 \to \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 b \bold{x} (bold roman) c 1-x (complement)
d x^\dagger D x^\ddagger e \htmlClass{emphasized}{x} (emphasize)
g \mathring x G \grave x h \hat x
H \widehat{x\dots} i x^{-} I x^{+}
k \mathfrak x (Fraktur) l x_\parallel m \mathtt x (monospace)
M \mp x n \bar x o \overline{x\dots}
p x_\perp P \pm x q = x
r \mathrm x (roman) s \mathsf x (sans-serif) S \mathsfit x (italic sans)
t \to x T \longrightarrow x u \breve x
U \utilde{x\dots} v \vec x V \overrightharpoon{x\dots}
w \check x W \widecheck{x\dots} x \boxed x (box)
X \sout x (crossout) Y \widetilde{x\dots} z \cancel x (cancel)
. \dot x > x. " \ddot x
  x\, (append space) ' x' * x^{*}
= \Rightarrow x - -x + +x
` x^\mathrm{T} (transpose) ~ \tilde x / 1/x
_ \underline{x\dots} ! \neg x \ \bcancel x
[ \small x (smaller) ] \large x (larger) { \overbrace{x\dots}
} \underbrace{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
d x^\dagger y e x,\dots,y f x\quad\mathrm{if}\quad y
F x\quad\mathrm{iff}\quad y g x\gets y (gets) 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 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
t x\to y T x\longrightarrow y u x\cup y
v x\vee y V x\veebar y w x\wedge y
W x\barwedge y x x\times y X x\otimes y
[ x\llcorner y ] x\lrcorner y = x\Rightarrow y
- x\ominus y + x\oplus y . x\cdot y
, x,y > x\cdots y < \left\langle x,y\right\rangle
( \left(x,y\right) * x*y : x\colon y
; x;y ` x^\mathrm{T} y / x/y
\ x\backslash y % x\div y Tab x\quad 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 \to 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 items into an "equation" by placing a relational operator between them. NOTE: There is no real distinction between relational and infix operators internally, so this = prefix is just a way to get more keybindings available.

Equality-like relations:

a x\approx y (approx) c x\cong y (congruent)
e x\equiv y E x\iff y
f x\Leftarrow y (from) i x\in y (in)
I x\notin y j x\Join y (join)
m x\mapsto y (maps to) o x\circeq y
= or q x = y ! or n x\ne y
p x\propto y (proportional) ; x\coloncolon y
: x\coloneqq y ~ or t 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
s x\subset y S x\subseteq y
u x\supset y 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 \to 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 x \to \displaystyle{\frac{1}{x}} a or / x\enspace y \to \displaystyle{\frac{x}{y}}
l x \to \lim\limits_x L x\enspace y \to \lim\limits_{x\to y}
b x\enspace y \to \displaystyle{\binom{x}{y}} I x\enspace y \to \displaystyle{\int_x^y}
= x\enspace y\enspace z \to \displaystyle\sum_{x=y}^z + x\enspace y \to \displaystyle\sum_{x\ge y}^{\phantom z}
q \sqrt{x} Q \sqrt[3]{x}
m \mathrm{Im}(x) M \mathrm{Re}(x)
e \mathrm{e}^x E \exp x
n \ln{x} N \log{x}
2n \lg{x} 2N \log_2{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 \to \cos^{-1} x
  • /hT \to \coth x
  • /-hS \to \operatorname{sech}^{-1} x
  • /2t \to \tan^2 x

Function Application:

  • o f\enspace x \to f(x)
  • r f\enspace x\enspace y \to f(x,y)
  • R f\enspace x\enspace y\enspace z \to f(x,y,z)
  • k f\enspace x\enspace y \to f(x\,|\,y)
  • K f\enspace x\enspace y\enspace z \to f(x,y\,|\,z)
  • [ f\enspace x \to f[x]
  • ] f\enspace x \to 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 patterns can be created by first building an argument list such as x,y\,|\,z,w and then applying to f with /o.

Vertical Stacking:

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

Probability and Statistics:

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

Shortcuts and Utilities:

  • w Swap the left and right sides of an infix or relational expression, or the numerator and denominator of a fraction.
  • 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 \to \left.x\right\vert_{y}   "Where" notation, for example: \left.\frac{1}{\sqrt{1-x^2}}\right\vert_{x=1/2}
  • ^ x\times{10}^y   Scientific notation, for example: 1.23\times{10}^{-4}
  • Enter x\enspace y\enspace z \to 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, or the numerator/denominator of a fraction.
  • ! "Negate" a relational operator in an infix expression by putting a slash through it. If already negated, the slash is removed instead. The operator most recently used to create the infix expression is the one negated. Example: x≤y \to x\nleq y
  • ' (apostrophe) Resolve a placeholder.
  • " 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 operation on a tagged item will remove the tag, so tags are generally added just before moving an item into the document.

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

  • d Subprefix for building derivative expressions.
  • i Subprefix for applying integral limits.
  • f Subprefix for applying named operators.

/d Derivative Building

These are some shortcuts for quickly creating common types of expressions involving derivatives and differentials.

j y\enspace x \to \frac{\partial y}{\partial x} J y\enspace x \to \frac{\partial^2 y}{\partial x^2}
q x \to \frac{\partial}{\partial x} Q x \to \frac{\partial^2}{\partial x^2}
m x\enspace y \to \frac{\partial^2}{\partial x\,\partial y} M f\enspace x\enspace y \to \frac{\partial^2 f}{\partial x\,\partial y}
k y\enspace x \to \frac{dy}{dx} K y\enspace x \to \frac{d^2 y}{dx^2}
x x \to \frac{d}{dx} X x \to \frac{d^2}{dx^2}
p x \to \partial x P x\enspace y \to \partial_y x
g x \to \nabla x G x\enspace y \to \nabla_y x
. x \to \nabla\cdot x c x \to \nabla\times x
l x \to \nabla^2 x n x \to \Delta x (increment)
d x \to dx 2 x \to d^2 x
3 x \to d^3 x 4 x \to d^4 x
f x\enspace y \to dx \wedge dy F x\enspace y\enspace z \to dx \wedge dy \wedge dz
E x\enspace y \to dx \wedge \cdots \wedge dy
i or I or   x\enspace y \to x\,dy (see below)

Integral Spacing: i and I and   are meant for attaching a differential to an existing integral expression with appropriate spacing. The difference between the three is where the spacing goes:

  • i Space goes before the differential. This is the usual "textbook" case, e.g. \int x^2\,dx
  • I Space goes after the differential, for when you want to concatenate the integrand afterwards: \int dx\,x^2
  •   No spacing around the differential, for simple cases like \int dx

Differential Forms: The f F E commands for building differential forms will pull out minus signs as needed, as in: -y\enspace x \to -dy \wedge dx. When concatenating differential forms to integral expressions, use ,  instead of   to avoid parenthesizing the differential form. For example: \int f{(x,y)}\,dx\wedge dy instead of \int f{(x,y)} \left(dx\wedge dy\right).

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.

/i Integral Limits

These commands are for quickly applying common limits to integral signs.

r \int \to \int_{-\infty}^\infty reals
p \int \to \int_0^\infty positive
n \int \to \int_{-\infty}^0 negative
u \int \to \int_0^1 unit
U \int \to \int_{-1}^1 symmetric unit
t \int \to \int_0^{2\pi} trigonometric
T \int \to \int_{-\pi}^\pi symmetric trigonometric

These can apply to objects other than integral signs as well, for example: \left[\frac{x^2}{2}\right]_0^1

Integral Sign + Limits: Using the prefix /j instead of /i works like the above, except that the integral sign itself is created too, rather than it having to exist beforehand. Example: /jr \to \int_{-\infty}^{\infty}

/f Named Operators

These commands attach named operators like \max to an expression from the stack. No automatic parenthesization is performed, and operators with multiple arguments need to have the arguments combined into one expression manually first (e.g. with ,,).

Capitalized versions of these commands take two expressions from the stack, placing the stack top under the operator name, and the other expression as the operator's argument. For example: /fg creates \argmax x while /fG creates \underset{x}{\argmax y}

a \arg c \gcd d \dim
e \deg f \liminf g \argmax
h \hom i \inf k \ker
l \lim m \min n \argmin
r \operatorname{tr} s \sup t \det
u \limsup x \max

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 (bra-ket)
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 < \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} \to \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 1xN 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 2x3 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\to \begin{bmatrix} a & b \\ c & d \end{bmatrix}
@ a\enspace b\to \begin{bmatrix} a \\ b \end{bmatrix} # a\enspace b\enspace c\to \begin{bmatrix} a \\ b \\ c\end{bmatrix}

Matrix Manipulation: These commands operate on existing matrices.

  • E Insert spaces and ellipses before the last row and column in a matrix, in order to notate a matrix that is not fully written out.
  • 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.
  • T Transpose a matrix by exchanging its rows and columns.
  • | 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 side by side (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 Stack N equations together aligned by their infix operator, if any.
  • g Stack N equations together where each equation is centered on its own.
  • c Build a list of N cases for a piecewise function definition. If the component items are infix expressions joined with a colon (via ,: or ::), 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
  • ; x_1;\,x_2;\,x_n
  • + x_1 + x_2 + \cdots + x_n
  • p x_1 + x_2 + x_n + \cdots

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.

_ 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 in dissect mode.
  • 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.

# Evaluate

These commands attempt to numerically evaluate the expression on the stack top, allowing the editor to operate as a simple calculator.

Evaluation requires the expression to be composed only of constant values and operations involving them. For example, \sin(\pi/6) can be evaluated but not \sin(2\pi x), although simple variable substitutions can be performed using the | subcommand below.

The result of the evaluation will be a floating-point number. However, if it can be closely approximated by a fraction, or a factor of something like \sqrt{2}, the result will instead be represented that way.

NOTE: This numerical evaluation feature is experimental and not everything is guaranteed to be supported.

  • = Try to evaluate the expression on the stack top. For example:
    • \sin\frac{\pi}{3} = \frac{\sqrt{3}}{2}
    • \sin(3) \approx 0.141120
    A second application of #= will force a decimal approximation.
  • Enter Like = but forces the decimal approximation right away.
  • | Evaluate with a variable substitution. Like =, but an extra expression on the stack top of the form z=123 is used to replace a variable in the expression to be evaluated. The variable defaults to x if omitted.
    NOTE: Currently the variable names must be single-letter only (Greek letters allowed), and only one variable substitution per expression is supported.

NOTE: Trigonometric functions use radians by default, but degrees can be specified by a "degree marker" superscript using 'o`. For example: 45 'o` yields {45}^\circ and the sine of this can be calculated via: /s#= \to\sin{{45}^\circ} = \frac{\sqrt{2}}{2}. Also, {45}^\circ\,\,#=\to \frac{\pi}{4}.

; : Greek Letters

Lowercase Greek letters use the ; prefix:

a \alpha b \beta c \chi 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 \xi y \psi
z \zeta

Uppercase Greek letters (and some variants) use the : prefix:

d \Delta e \varepsilon f \Phi g \Gamma k \varkappa
l \Lambda m \varpi n \nabla o \Omega p \Pi
q \vartheta r \varrho s \Sigma t \varsigma u \Upsilon
v \Theta w \Omega x \Xi y \Psi 6 \digamma

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

d \varDelta f \varPhi g \varGamma l \varLambda o \varOmega
p \varPi q \varTheta s \varSigma u \varUpsilon x \varXi
y \varPsi

NOTE: The sequences ;; and :: can be used as alternatives to ,; and ,: to join two expressions with a semicolon or colon.

NOTE: As a convenience, you can use uppercase keystrokes as well as lowercase in order to type the Greek letters that use : or ;:.

$ 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%.
  • m Toggle whether to show math expressions in the stack area aligned to the left or to the right.
  • M Like m but for the document area instead.
  • i Toggle between full-size math display (the default) and compact inline math display modes. NOTE: With inline math display mode, equations are always aligned to the left, regardless of the setting chosen by $m and $M.
  • z or + 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 * resets the zoom factor back to the default.
  • Z or - Like z or + but decrease the zoom factor instead.
  • f Enter fullscreen mode if your browser supports it. F exits fullscreen.
  • 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).
  • S Toggle sepia color filter (mutually exclusive with inverse video mode).
  • E Toggle E-ink mode, which adjusts some colors and styling to improve display on E-ink devices.
  • 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.

  • Ctrl+0 Add a 0 subscript: x_0 (same as .0)
  • Ctrl+1 Ctrl+2 Ctrl+3 Ctrl+4 Add other superscripts: x^{-1}, x^2, x^3, x^4 (same as .1, etc.)
  • Ctrl+a Swap the top two stack top items (same as Taba)
  • Ctrl+b Apply a bold font to the stack top (same as ])
  • Ctrl+c Copy stack top to clipboard (same as Tabc)
  • Ctrl+e x \to \mathrm{e}^x (same as /e)
  • 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 \to f(x\,|\,y) (same as /k)
  • Ctrl+K f\enspace x\enspace y\enspace z \to f(x,y\,|\,z) (same as /K)
  • Ctrl+l Recenter the document view around the current document selection (same as Tabl)
  • Ctrl+m x \to -x (same as .-)
  • Ctrl+o f\enspace x \to f(x) (same as /o)
  • Ctrl+p Enclose the stack top in parentheses (same as ()
  • Ctrl+r f\enspace x\enspace y \to f(x,y) (same as /r)
  • Ctrl+R f\enspace x\enspace y\enspace z \to f(x,y,z) (same as /R)
  • Ctrl+s Save the current document (same as Tabs)
  • Ctrl+u Make superscript (same as `)
  • Ctrl+v Paste clipboard to stack top (same as Tabv)
  • Ctrl+x f \to f(x)
  • Ctrl+z Undo last action (same as TabTab)
  • Ctrl+y Redo actions undone by 'undo' (same as Tab.)
  • Ctrl+/ x\enspace y \to \frac{x}{y} (same as //)
  • Ctrl+, Join two items with a comma (same as ,,)
  • Ctrl+Space Join two items with a thin space (same as , )
  • Ctrl+←→ (left/right arrows) Scroll the document panel left or right if the contents are too wide (same as Tab+←→)