diff --git a/README.md b/README.md index 39e8f0dc..fdba347c 100644 --- a/README.md +++ b/README.md @@ -29,13 +29,13 @@ Try out KaTeX [on the demo page](https://katex.org/#demo)! - + - + - ... diff --git a/contrib/copy-tex/README.md b/contrib/copy-tex/README.md index 1f667f02..20edfd74 100644 --- a/contrib/copy-tex/README.md +++ b/contrib/copy-tex/README.md @@ -21,8 +21,8 @@ provided by this extension). Without this CSS, partially selected equations will just get the usual HTML copy/paste behavior. ```html - - + + ``` See [index.html](index.html) for an example. @@ -37,7 +37,7 @@ statement with `require('katex/contrib/copy-tex/katex2tex.js')`. ECMAScript module is also available: ```html - + ### Known Issues diff --git a/contrib/mathtex-script-type/README.md b/contrib/mathtex-script-type/README.md index 19d06247..1f6597ed 100644 --- a/contrib/mathtex-script-type/README.md +++ b/contrib/mathtex-script-type/README.md @@ -11,7 +11,7 @@ included in the page, in addition to KaTeX. Load the extension by adding the following line to your HTML file. ```html - + ``` You can download the script and use it locally, or from a local KaTeX installation instead. @@ -23,9 +23,9 @@ Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1 - - - + + + @@ -35,4 +35,4 @@ Then, in the body, we use a `math/tex` script to typeset the equation `x+\sqrt{1 ECMAScript module is also available: ```html - + diff --git a/contrib/mhchem/README.md b/contrib/mhchem/README.md index e7434654..8a57faf3 100644 --- a/contrib/mhchem/README.md +++ b/contrib/mhchem/README.md @@ -7,7 +7,7 @@ This extension adds to KaTeX the `\ce` and `\pu` functions from the [mhchem](htt This extension isn't part of core KaTeX, so the script should be separately included. Write the following line into the HTML page's ``. Place it *after* the line that calls `katex.js`. ```html - + ``` If you remove the `defer` attribute from this tag, then you must also remove the `defer` attribute from the ` - + ``` @@ -31,9 +31,9 @@ want to use a `defer` or `onload` attribute. For example: ```html - - - + + + ``` diff --git a/docs/browser.md b/docs/browser.md index df545a12..ade228aa 100644 --- a/docs/browser.md +++ b/docs/browser.md @@ -11,13 +11,13 @@ title: Browser - + - + - ... @@ -29,15 +29,15 @@ If you include the `katex.js` directly, the `katex` object will be available as a global variable. ```html - - + + ``` KaTeX also provides minified versions: ```html - - + + ``` The examples above load the script [deferred using the `defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) @@ -81,22 +81,22 @@ for more detail. ```html - + ``` ### ECMAScript module ```html - - + + ``` > Use [`nomodule` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes) diff --git a/package.json b/package.json index 1036bbc0..906f7313 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "katex", - "version": "0.12.1-pre", + "version": "0.13.0", "description": "Fast math typesetting for the web.", "main": "dist/katex.js", "homepage": "https://katex.org", diff --git a/website/versioned_docs/version-0.13.0/api.md b/website/versioned_docs/version-0.13.0/api.md new file mode 100644 index 00000000..ded4232a --- /dev/null +++ b/website/versioned_docs/version-0.13.0/api.md @@ -0,0 +1,66 @@ +--- +id: version-0.13.0-api +title: API +original_id: api +--- +## In-browser rendering +Call `katex.render` with a TeX expression and a DOM element to render into: + +```js +katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, { + throwOnError: false +}); +``` + +To avoid escaping the backslash (double backslash), you can use +[`String.raw`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw) +(but beware that `${`, `\u` and `\x` may still need escaping): +```js +katex.render(String.raw`c = \pm\sqrt{a^2 + b^2}`, element, { + throwOnError: false +}); +``` + +## Server-side rendering or rendering to a string +To generate HTML on the server or to generate an HTML string of the rendered math, you can use `katex.renderToString`: + +```js +var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}", { + throwOnError: false +}); +// '...' +``` + +## Handling errors + +The examples above use the `throwOnError: false` option, which renders invalid +inputs as the TeX source code in red (by default), with the error message as +hover text. Without this option, invalid LaTeX will cause a +`katex.ParseError` exception to be thrown. See [handling errors](error.md). + +## Configuring KaTeX + +The last argument to `katex.render` and `katex.renderToString` can contain +[a variety of rendering options](options.md). + +## Persistent Macros + +KaTeX’s [macro documentation](supported.html#gdef) tells the author that `\gdef` will create a macro that persists between KaTeX elements. In order to enable that persistence, you must create one shared `macros` object that you pass into every call to `katex.render` or `katex.renderToString`. (Do not create a fresh `macros` object for each call.) + +For example, suppose that you have an array `mathElements` of DOM elements that contain math. Then you could write this code: + +```js +const macros = {}; +for (let element of mathElements) { + katex.render(element.textContent, element, { + throwOnError: false, + macros + }; +} +``` + +Notice that you create the `macros` object outside the loop. If an author uses `\gdef`, KaTeX will insert that macro definition into the `macros` object and since `macros` continues to exist between calls to `katex.render`, `\gdef` macros will persist between `mathElements`. + +### Security of Persistent Macros + +Persistent macros can change the behavior of KaTeX (e.g. redefining standard commands), so for security, such a setup should be used only for multiple elements of common trust. For example, you might enable persistent macros within a message posted by a single user (by creating a `macros` object for that message), but you probably should not enable persistent macros across multiple messages posted by multiple users. diff --git a/website/versioned_docs/version-0.13.0/autorender.md b/website/versioned_docs/version-0.13.0/autorender.md new file mode 100644 index 00000000..77b8722b --- /dev/null +++ b/website/versioned_docs/version-0.13.0/autorender.md @@ -0,0 +1,129 @@ +--- +id: version-0.13.0-autorender +title: Auto-render Extension +original_id: autorender +--- +This is an extension to automatically render all of the math inside of text. It +searches all of the text nodes within a given element for the given delimiters, +ignoring certain tags like `
`, and renders the math in place.
+
+## Usage
+This extension isn't part of KaTeX proper, so the script needs to be included
+(via a `
+
+```
+
+> Above, the [`defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
+indicates that the script doesn't need to execute until the page has loaded,
+speeding up page rendering; and the `onload` attribute calls
+`renderMathInElement` once the auto-render script loads.
+
+Alternatively, you can call the `renderMathInElement` when (or after) the
+[`DOMContentLoaded` event](https://developer.mozilla.org/ko/docs/Web/Reference/Events/DOMContentLoaded)
+fires on the document or in another deferred script.
+This approach is useful for specifying or computing options, or if you don't
+want to use a `defer` or `onload` attribute.
+For example:
+
+```html
+
+
+
+
+```
+
+ECMAScript module is also available:
+```html
+
+
+```
+
+> You can use [`nomodule` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
+to provide a fallback for older browsers that do not support ES modules. -->
+
+## API
+This extension exposes a single function, `window.renderMathInElement`, with
+the following API:
+
+```js
+function renderMathInElement(elem, options)
+```
+
+`elem` is an HTML DOM element. The function will recursively search for text
+nodes inside this element and render the math in them.
+
+`options` is an optional object argument that can have the same keys as [the
+object passed to `katex.render`](https://github.com/KaTeX/KaTeX/#rendering-options),
+in addition to two auto-render-specific keys:
+
+- `delimiters`: This is a list of delimiters to look for math, processed in
+  the same order as the list. Each delimiter has three properties:
+
+    - `left`: A string which starts the math expression (i.e. the left delimiter).
+    - `right`: A string which ends the math expression (i.e. the right delimiter).
+    - `display`: A boolean of whether the math in the expression should be
+      rendered in display mode or not.
+
+  The default value is:
+
+  ```js
+  [
+    {left: "$$", right: "$$", display: true},
+    {left: "\\(", right: "\\)", display: false},
+    {left: "\\begin{equation}", right: "\\end{equation}", display: true},
+    {left: "\\begin{align}", right: "\\end{align}", display: true},
+    {left: "\\begin{alignat}", right: "\\end{alignat}", display: true},
+    {left: "\\begin{gather}", right: "\\end{gather}", display: true},
+    {left: "\\begin{CD}", right: "\\end{CD}", display: true},
+    {left: "\\[", right: "\\]", display: true}
+  ]
+  ```
+
+  If you want to add support for inline math via `$...$`, be sure to list it
+  *after* `$$`, as in the following. (Because rules are processed in order,
+  putting a `$` rule first would catch `$$` as an empty math expression.)
+
+  ```js
+  [
+    {left: "$$", right: "$$", display: true},
+    {left: "$", right: "$", display: false},
+    {left: "\\(", right: "\\)", display: false},
+    {left: "\\[", right: "\\]", display: true}
+  ]
+  ```
+
+- `ignoredTags`: This is a list of DOM node types to ignore when recursing
+  through. The default value is
+  `["script", "noscript", "style", "textarea", "pre", "code", "option"]`.
+
+- `ignoredClasses`: This is a list of DOM node class names to ignore when
+  recursing through. By default, this value is not set.
+
+- `errorCallback`: A callback method returning a message and an error stack
+  in case of an critical error during rendering. The default uses `console.error`.
+
+- `preProcess`: A callback function, `(math: string) => string`, used to process
+  math expressions before rendering.
+
+The `displayMode` property of the options object is ignored, and is
+instead taken from the `display` key of the corresponding entry in the
+`delimiters` key.
+
+The same `options.macros` object (which defaults to an empty object `{}`)
+is passed into several calls to `katex.render`, so that consecutive equations
+can build up shared macros by `\gdef`.
diff --git a/website/versioned_docs/version-0.13.0/browser.md b/website/versioned_docs/version-0.13.0/browser.md
new file mode 100644
index 00000000..9c6d9001
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/browser.md
@@ -0,0 +1,119 @@
+---
+id: version-0.13.0-browser
+title: Browser
+original_id: browser
+---
+> KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 11.
+
+## Starter template
+
+```html
+
+
+
+  
+    
+
+    
+    
+
+    
+    
+  
+  ...
+
+```
+
+## Loading as Global
+If you include the `katex.js` directly, the `katex` object will be available as
+a global variable.
+
+```html
+
+
+```
+
+KaTeX also provides minified versions:
+
+```html
+
+
+```
+
+The examples above load the script [deferred using the `defer` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
+to speed up page rendering. The `katex` object will be available after
+[`DOMContentLoaded` event is fired on the `document`](https://developer.mozilla.org/ko/docs/Web/Reference/Events/DOMContentLoaded).
+If you do not use `defer`, `katex` object will be available after the corresponding
+`script` tag.
+
+If KaTeX is not used immediately or not critical, it is possible to load KaTeX
+asynchronously. Add [`async` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
+to `script` and use [`rel="preload"` and `onload` attribute](https://github.com/filamentgroup/loadCSS)
+on `link`.
+
+You can prefetch KaTeX fonts to prevent FOUT or FOIT. Use [Font Loading API](https://developer.mozilla.org/en-US/docs/Web/API/CSS_Font_Loading_API)
+or [Web Font Loader](https://github.com/typekit/webfontloader):
+
+```html
+
+
+```
+
+You can also use [`rel="preload"`](https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content).
+Add ``
+to `head`. Note that [only few browsers support it](https://caniuse.com/#feat=link-rel-preload)
+and they all support WOFF2 so preloading WOFF2 fonts is enough.
+
+See [Google Web Fundamentals - Web Font Optimization](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization)
+for more detail.
+
+## Module Loaders
+### AMD
+```html
+
+
+```
+
+### ECMAScript module
+```html
+
+
+
+```
+
+> Use [`nomodule` attribute](https://developer.mozilla.org/en/HTML/Element/script#Attributes)
+to provide a fallback for older browsers that do not support ES modules.
+
+## Download & Host Things Yourself
+Download a [KaTeX release](https://github.com/KaTeX/KaTeX/releases),
+copy `katex.js`, `katex.css`
+(or `katex.min.js` and `katex.min.css` to use minified versions),
+and the `fonts` directory, and include or import it like above.
+
+You can also build from source. See [Building from Source](node.md#building-from-source)
+for more details.
+
+## Bundler
+[Use Node.js package managers to install KaTeX and import it](node.md) in your
+project. Then bundle using bundlers like [webpack](https://webpack.js.org/) or
+[rollup.js](https://rollupjs.org/). Note that you have to bundle the stylesheet
+(`katex.css`) or include it manually.
diff --git a/website/versioned_docs/version-0.13.0/cli.md b/website/versioned_docs/version-0.13.0/cli.md
new file mode 100644
index 00000000..d514d505
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/cli.md
@@ -0,0 +1,67 @@
+---
+id: version-0.13.0-cli
+title: CLI
+original_id: cli
+---
+
+KaTeX installed [using Node.js package managers](node.md) comes with a
+built-in command-line interface (CLI) which can be used to render TeX to HTML.
+By default, CLI will take the input from standard input.
+
+```bash
+npx katex
+```
+
+> Above uses the `npx` command to run the locally installed executable
+after `npm install katex`.  You can also execute with the relative path:
+`./node_modules/.bin/katex`
+
+> To use the CLI from local Git clone, you need to build the project first.
+See [Building from Source](node.md#building-from-source) for more details.
+
+## Options
+
+### `-V, --version`
+output the version number
+
+### `-d, --display-mode`
+Render math in display mode, which puts the math in display style (so \int and \sum are large, for example), and centers the math on the page on its own line.
+
+### `--leqno`
+Render display math in leqno style (left-justified tags).
+
+### `--fleqn`
+Render display math flush left.
+
+### `-t, --no-throw-on-error`
+Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.
+
+### `-c, --error-color `
+A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.
+
+### `-b, --color-is-text-color`
+Makes \color behave like LaTeX's 2-argument \textcolor, instead of LaTeX's one-argument \color mode change.
+
+### `-S, --strict`
+Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX
+
+### `-s, --max-size `
+If non-zero, all user-specified sizes, e.g. in \rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large
+
+### `-e, --max-expand `
+Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops.  If set to Infinity, the macro expander will try to fully expand as in LaTeX.
+
+### `-m, --macro `
+Define custom macro of the form '\foo:expansion' (use multiple -m arguments for multiple macros).
+
+### `-f, --macro-file `
+Read macro definitions, one per line, from the given file.
+
+### `-i, --input `
+Read LaTeX input from the given file.
+
+### `-o, --output `
+Write html output to the given file.
+
+### `-h, --help`
+Output usage information
diff --git a/website/versioned_docs/version-0.13.0/font.md b/website/versioned_docs/version-0.13.0/font.md
new file mode 100644
index 00000000..5e177eba
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/font.md
@@ -0,0 +1,47 @@
+---
+id: version-0.13.0-font
+title: Font
+original_id: font
+---
+By changing the variables in the `fonts.less` file at the [katex-fonts submodule](https://github.com/KaTeX/katex-fonts/),
+several properties of the way fonts are used can be changed.
+
+## Font size and lengths
+By default, KaTeX math is rendered in a 1.21× larger font than the surrounding
+context, which makes super- and subscripts easier to read. You can control
+this using CSS, for example, to set to 1.1×:
+
+```css
+.katex { font-size: 1.1em; }
+```
+
+KaTeX supports all TeX units, including absolute units like `cm` and `in`.
+Absolute units are currently scaled relative to the default TeX font size of
+10pt, so that `\kern1cm` produces the same results as `\kern2.845275em`.
+As a result, relative and absolute units are both uniformly scaled relative
+to LaTeX with a 10pt font; for example, the rectangle `\rule{1cm}{1em}` has
+the same aspect ratio in KaTeX as in LaTeX.  However, because most browsers
+default to a larger font size, this typically means that a 1cm kern in KaTeX
+will appear larger than 1cm in browser units.
+
+## Kinds of fonts used
+
+KaTeX provides fonts in three different formats: `ttf`, `woff`, and `woff2`.
+
+- `ttf`s are included to support very old browsers and local installation. [Browser support](https://caniuse.com/#feat=ttf)
+- `woff` is the format that is most widely supported (all modern browsers support it), so it probably provides the most benefit to being included. [Browser support](https://caniuse.com/#feat=woff)
+- `woff2`s are included for modern browsers, because they are much smaller and faster to load. [Browser support](https://caniuse.com/#feat=woff2)
+
+KaTeX will automatically include only necessary fonts for target environments
+specified by [Browserslist config](https://github.com/browserslist/browserslist#queries).
+
+To force a font type to be included or excluded, set `USE_(FONT NAME)` environment
+variable to `"true"` or `"false"`, respectively.
+
+## Location of font files
+
+The default build of KaTeX expects the KaTeX fonts to be located in a directory called `fonts` which is a sibling of the `katex.min.css` stylesheet. This can be changed as follows:
+
+1. At the top of the [fonts.less](https://github.com/KaTeX/katex-fonts/blob/master/fonts.less) file, set `@font-folder` to the location of your fonts. You can use relative or absolute paths, so setting it to `"/fonts"` would cause it to search for the fonts in a root `fonts` folder, while `"../fonts"` would search in a `fonts` directory one level above the `katex.min.css` file.
+2. Rebuild KaTeX by running `yarn build` from the top-level directory.
+3. Use the newly generated `dist/katex.min.css` file, and place the fonts where you indicated.
diff --git a/website/versioned_docs/version-0.13.0/migration.md b/website/versioned_docs/version-0.13.0/migration.md
new file mode 100644
index 00000000..b6bf3547
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/migration.md
@@ -0,0 +1,31 @@
+---
+id: version-0.13.0-migration
+title: Migration Guide
+original_id: migration
+---
+
+As of KaTeX 1.0, we've changed how MacroExpander and Parser work in order to close
+some gaps between KaTeX and LaTeX and therefore there may be breaking changes.
+
+## Macro arguments
+Tokens will not be expanded while parsing a macro argument. For example, `\frac\foo\foo`,
+where the `\foo` is defined as `12`, will be parsed as `\frac{12}{12}`, not
+`\frac{1}{2}12`. To expand the argument before parsing, `\expandafter` can
+be used like `\expandafter\frac\foo\foo`.
+
+## `\def`
+`\def` no longer accepts a control sequence enclosed in braces. For example,
+`\def{\foo}{}` no longer works and should be changed to `\def\foo{}`.
+
+It also no longer accepts replacement text not enclosed in braces. For example,
+`\def\foo1` no longer works and should be changed to `\def\foo{1}`.
+
+## `\newline` and `\cr`
+`\newline` and `\cr` no longer takes an optional size argument. To specify vertical
+spacing, `\\` should be used.
+
+## `\cfrac`, `\color`, `\textcolor`, `\colorbox`, `\fcolorbox`
+They are no longer allowed as an argument to primitive commands, such as `\sqrt`
+(without the optional argument) and super/subscript. For example,
+`\sqrt\textcolor{red}{x}` no longer works and should be changed to
+`\sqrt{\textcolor{red}{x}}`.
diff --git a/website/versioned_docs/version-0.13.0/options.md b/website/versioned_docs/version-0.13.0/options.md
new file mode 100644
index 00000000..b42e786e
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/options.md
@@ -0,0 +1,72 @@
+---
+id: version-0.13.0-options
+title: Options
+original_id: options
+---
+You can provide an object of options as the last argument to [`katex.render` and `katex.renderToString`](api.md). Available options are:
+
+- `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`)
+- `output`: `string`. Determines the markup language of the output. The valid choices are:
+  - `html`: Outputs KaTeX in HTML only.
+  - `mathml`: Outputs KaTeX in MathML only.
+  - `htmlAndMathml`: Outputs HTML for visual rendering and includes MathML for accessibility. This is the default.
+- `leqno`: `boolean`. If `true`, display math has `\tag`s rendered on the left instead of the right, like `\usepackage[leqno]{amsmath}` in LaTeX.
+- `fleqn`: `boolean`. If `true`, display math renders flush left with a `2em` left margin, like `\documentclass[fleqn]` in LaTeX with the `amsmath` package.
+- `throwOnError`: `boolean`. If `true` (the default), KaTeX will throw a `ParseError` when it encounters an unsupported command or invalid LaTeX. If `false`, KaTeX will render unsupported commands as text, and render invalid LaTeX as its source code with hover text giving the error, in the color given by `errorColor`.
+- `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color that unsupported commands and invalid LaTeX are rendered in when `throwOnError` is set to `false`. (default: `#cc0000`)
+- `macros`: `object`. A collection of custom macros. Each macro is a property with a name like `\name` (written `"\\name"` in JavaScript) which maps to a string that describes the expansion of the macro, or a function that accepts an instance of `MacroExpander` as first argument and returns the expansion as a string. `MacroExpander` is an internal API and subject to non-backwards compatible changes. See [`src/macros.js`](https://github.com/KaTeX/KaTeX/blob/master/src/macros.js) for its usage. Single-character keys can also be included in which case the character will be redefined as the given macro (similar to TeX active characters). *This object will be modified* if the LaTeX code defines its own macros via `\gdef`, which enables consecutive calls to KaTeX to share state.
+- `minRuleThickness`: `number`. Specifies a minimum thickness, in ems, for fraction lines, `\sqrt` top lines, `{array}` vertical lines, `\hline`, `\hdashline`, `\underline`, `\overline`, and the borders of `\fbox`, `\boxed`, and `\fcolorbox`. The usual value for these items is `0.04`, so for `minRuleThickness` to be effective it should probably take a value slightly above `0.04`, say `0.05` or `0.06`. Negative values will be ignored.
+- `colorIsTextColor`: `boolean`. In early versions of both KaTeX (<0.8.0) and MathJax, the `\color` function expected the content to be a function argument, as in `\color{blue}{hello}`. In current KaTeX, `\color` is a switch, as in `\color{blue} hello`. This matches LaTeX behavior. If you want the old `\color` behavior, set option `colorIsTextColor` to true.
+- `maxSize`: `number`. All user-specified sizes, e.g. in `\rule{500em}{500em}`, will be capped to `maxSize` ems. If set to `Infinity` (the default), users can make elements and spaces arbitrarily large.
+- `maxExpand`: `number`. Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to `Infinity`, the macro expander will try to fully expand as in LaTeX. (default: 1000)
+- `strict`: `boolean` or `string` or `function` (default: `"warn"`). If `false` or `"ignore`", allow features that make writing LaTeX convenient but are not actually supported by (Xe)LaTeX (similar to MathJax). If `true` or `"error"` (LaTeX faithfulness mode), throw an error for any such transgressions. If `"warn"` (the default), warn about such behavior via `console.warn`. Provide a custom function `handler(errorCode, errorMsg, token)` to customize behavior depending on the type of transgression (summarized by the string code `errorCode` and detailed in `errorMsg`); this function can also return `"ignore"`, `"error"`, or `"warn"` to use a built-in behavior.  A list of such features and their `errorCode`s:
+
+  - `"unknownSymbol"`: Use of unknown Unicode symbol, which will likely also
+    lead to warnings about missing character metrics, and layouts may be
+    incorrect (especially in terms of vertical heights).
+  - `"unicodeTextInMathMode"`: Use of Unicode text characters in math mode.
+  - `"mathVsTextUnits"`: Mismatch of math vs. text commands and units/mode.
+  - `"commentAtEnd"`: Use of `%` comment without a terminating newline.
+    LaTeX would thereby comment out the end of math mode (e.g. `$`),
+    causing an error.
+  - `"htmlExtension"`: Use of HTML extension (`\html`-prefixed) commands,
+    which are provieded for HTML manipulation.
+
+  A second category of `errorCode`s never throw errors, but their strictness
+  affects the behavior of KaTeX:
+
+  - `"newLineInDisplayMode"`: Use of `\\` or `\newline` in display mode
+    (outside an array/tabular environment).  In strict mode, no line break
+    results, as in LaTeX.
+
+- `trust`: `boolean` or `function` (default: `false`). If `false` (do not trust input), prevent any commands like `\includegraphics` that could enable adverse behavior, rendering them instead in `errorColor`. If `true` (trust input), allow all such commands. Provide a custom function `handler(context)` to customize behavior depending on the context (command, arguments e.g. a URL, etc.).  A list of possible contexts:
+
+  - `{command: "\\url", url, protocol}`
+  - `{command: "\\href", url, protocol}`
+  - `{command: "\\includegraphics", url, protocol}`
+  - `{command: "\\htmlClass", class}`
+  - `{command: "\\htmlId", id}`
+  - `{command: "\\htmlStyle", style}`
+  - `{command: "\\htmlData", attributes}`
+
+  Here are some sample trust settings:
+
+  - Forbid specific command: `trust: (context) => context.command !== '\\includegraphics'`
+  - Allow specific command: `trust: (context) => context.command === '\\url'`
+  - Allow multiple specific commands: `trust: (context) => ['\\url', '\\href'].includes(context.command)`
+  - Allow all commands with a specific protocol: `trust: (context) => context.protocol === 'http'`
+  - Allow all commands with specific protocols: `trust: (context) => ['http', 'https', '_relative'].includes(context.protocol)`
+  - Allow all commands but forbid specific protocol: `trust: (context) => context.protocol !== 'file'`
+  - Allow certain commands with specific protocols: `trust: (context) => ['\\url', '\\href'].includes(context.command) && ['http', 'https', '_relative'].includes(context.protocol)`
+- `globalGroup`: `boolean`  (default: `false`). Place KaTeX code in the global group. As a consequence, `\def` and `\newcommand` persist in `macros` across render calls. In LaTeX, constructs such as `\begin{equation}` and `$$` create a local group and prevent definitions from becoming visible outside of those blocks.
+
+For example:
+
+```js
+katex.render("c = \\pm\\sqrt{a^2 + b^2}\\in\\RR", element, {
+  displayMode: true,
+  macros: {
+    "\\RR": "\\mathbb{R}"
+  }
+});
+```
diff --git a/website/versioned_docs/version-0.13.0/support_table.md b/website/versioned_docs/version-0.13.0/support_table.md
new file mode 100644
index 00000000..49f785fc
--- /dev/null
+++ b/website/versioned_docs/version-0.13.0/support_table.md
@@ -0,0 +1,1269 @@
+---
+id: version-0.13.0-support_table
+title: Support Table
+original_id: support_table
+---
+This is a list of TeX functions, sorted alphabetically. This list includes functions that KaTeX supports and some that it doesn't support. There is a similar page, with functions [sorted by type](supported.md).
+
+If you know the shape of a character, but not its name, [Detexify](http://detexify.kirelabs.org/classify.html) can help.
+
+
+
+
+## Symbols
+
+|Symbol/Function |  Rendered   | Source or Comment|
+|:---------------|:------------|:-----------------|
+|\!|$n!$|`n!`|
+|\\\!|$a\!b$|`a\!b`|
+|#|$\def\bar#1{#1^2} \bar{y}$|`\def\bar#1{#1^2} \bar{y}`|
+|\\#|$\#$||
+|%||`%this is a comment`|
+|\\%|$\%$||
+|&|$\begin{matrix} a & b\cr c & d \end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}`| +|\\&|$\&$|| +|'|$'$|| +|\\\'|$\text{\'{a}}$|`\text{\'{a}}`| +|(|$($|| +|)|$)$|| +|\\\(…\\\)|$\text{\(\frac a b\)}$|`\text{\(\frac a b\)}`| +|\\ |$a\ b$|`a\ b`| +|\\"|$\text{\"{a}}$|`\text{\"{a}}`| +|\\$|$\text{\textdollar}$|| +|\\,|$a\,\,{b}$|`a\,\,{b}`| +|\\.|$\text{\.{a}}$|`\text{\.{a}}`| +|\\:|$a\:\:{b}$|`a\:\:{b}`| +|\\;|$a\;\;{b}$|a`\;\;{b}`| +|_|$x_i$|`x_i`| +|\\_|$\_$|| +|\\\`|$\text{\`{a}}$|`\text{\\'{a}}`| +|<|$<$|| +|\\=|$\text{\={a}}$|`\text{\\={a}}`| +| >|$>$|| +|\\>|$a\>\>{b}$|`a\>\>{b}`| +|\[|$[$|| +|\]|$]$|| +|{|${a}$|`{a}`| +|}|${a}$|`{a}`| +|\\{|$\{$|| +|\\}|$\}$|| +|||$\vert$|| +|\\||$\Vert$|| +|~|$\text{no~no~no~breaks}$|`\text{no~no~no~breaks}`| +|\\~|$\text{\~{a}}$|`\text{\\~{a}}`| +|\\\\|$\begin{matrix} a & b\\ c & d\end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}`| +|^|$x^i$|`x^i`| +|\\^|$\text{\^{a}}$|`\text{\\^{a}}`| + +## A + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\AA|$\text{\AA}$|`\text{\AA}`| +|\aa|$\text{\aa}$|`\text{\aa}`| +|\above|${a \above{2pt} b+1}$|`{a \above{2pt} b+1}`| +|\abovewithdelims|Not supported|| +|\acute|$\acute e$|`\acute e`| +|\AE|$\text{\AE}$|`\text{\AE}`| +|\ae|$\text{\ae}$|`\text{\ae}`| +|\alef|$\alef$|| +|\alefsym|$\alefsym$|| +|\aleph|$\aleph$|| +|{align}|$$\begin{align}a&=b+c\\d+e&=f\end{align}$$|`\begin{align}`
   `a&=b+c \\`
   `d+e&=f`
`\end{align}`| +|{align\*}|$$\begin{align*}a&=b+c\\d+e&=f\end{align*}$$|`\begin{align*}`
   `a&=b+c \\`
   `d+e&=f`
`\end{align*}`| +|{aligned}|$\begin{aligned}a&=b+c\\d+e&=f\end{aligned}$|`\begin{aligned}`
   `a&=b+c \\`
   `d+e&=f`
`\end{aligned}`| +|{alignat}|$$\begin{alignat}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignat}$$|`\begin{alignat}{2}`
   `10&x+ &3&y = 2 \\`
   ` 3&x+&13&y = 4`
`\end{alignat}`| +|{alignat\*}|$$\begin{alignat*}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignat*}$$|`\begin{alignat*}{2}`
   `10&x+ &3&y = 2 \\`
   ` 3&x+&13&y = 4`
`\end{alignat*}`| +|{alignedat}|$\begin{alignedat}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignedat}$|`\begin{alignedat}{2}`
   `10&x+ &3&y = 2 \\`
   ` 3&x+&13&y = 4`
`\end{alignedat}`| +|\allowbreak||| +|\Alpha|$\Alpha$|| +|\alpha|$\alpha$|| +|\amalg|$\amalg$|| +|\And|$\And$|| +|\and|Not supported|[Deprecated](https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax)| +|\ang|Not supported|[Deprecated](https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax)| +|\angl|$a_{\angl n}$|| +|\angln|$a_\angln$|| +|\angle|$\angle$|| +|\approx|$\approx$|| +|\approxeq|$\approxeq$|| +|\approxcolon|$\approxcolon$|| +|\approxcoloncolon|$\approxcoloncolon$|| +|\arccos|$\arccos$|| +|\arcctg|$\arcctg$|| +|\arcsin|$\arcsin$|| +|\arctan|$\arctan$|| +|\arctg|$\arctg$|| +|\arg|$\arg$|| +|\argmax|$\argmax$|| +|\argmin|$\argmin$|| +|{array}|$\begin{array}{cc}a&b\\c&d\end{array}$ | `\begin{array}{cc}`
   `a & b \\`
   `c & d`
`\end{array}`| +|\array|Not supported|see `{array}`| +|\arraystretch|$\def\arraystretch{1.5}\begin{array}{cc}a&b\\c&d\end{array}$|`\def\arraystretch{1.5}`
`\begin{array}{cc}`
   `a & b \\`
   `c & d`
`\end{array}`| +|\Arrowvert|Not supported|see `\Vert`| +|\arrowvert|Not supported|see `\vert`| +|\ast|$\ast$|| +|\asymp|$\asymp$|| +|\atop|${a \atop b}$|`{a \atop b}`| +|\atopwithdelims|Not supported|| + +## B + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\backepsilon|$\backepsilon$|| +|\backprime|$\backprime$|| +|\backsim|$\backsim$|| +|\backsimeq|$\backsimeq$|| +|\backslash|$\backslash$|| +|\bar|$\bar{y}$|`\bar{y}`| +|\barwedge|$\barwedge$|| +|\Bbb|$\Bbb{ABC}$|`\Bbb{ABC}`
KaTeX supports A-Z & k| +|\Bbbk|$\Bbbk$|| +|\bbox|Not supported|| +|\bcancel|$\bcancel{5}$|`\bcancel{5}`| +|\because|$\because$|| +|\begin|$\begin{matrix} a & b\\ c & d\end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}`| +|\begingroup|$\begingroup a}$|`\begingroup a}`| +|\Beta|$\Beta$|| +|\beta|$\beta$|| +|\beth|$\beth$|| +|\between|$\between$|| +|\bf|$\bf AaBb12$|`\bf AaBb12`| +|\bfseries|Not supported|| +|\big|$\big(\big)$|`\big(\big)`| +|\Big|$\Big(\Big)$|`\Big(\Big)`| +|\bigcap|$\bigcap$|| +|\bigcirc|$\bigcirc$|| +|\bigcup|$\bigcup$|| +|\bigg|$\bigg(\bigg)$|`\bigg(\bigg)`| +|\Bigg|$\Bigg(\Bigg)$|`\Bigg(\Bigg)`| +|\biggl|$\biggl($|`\biggl(`| +|\Biggl|$\Biggl($|`\Biggl(`| +|\biggm|$\biggm\vert$|`\biggm\vert`| +|\Biggm|$\Biggm\vert$|`\Biggm\vert`| +|\biggr|$\biggr)$|`\biggr)`| +|\Biggr|$\Biggr)$|`\Biggr)`| +|\bigl|$\bigl($|`\bigl(`| +|\Bigl|$\Bigl($|`\Bigl(`| +|\bigm|$\bigm\vert$|`\bigm\vert`| +|\Bigm|$\Bigm\vert$|`\Bigm\vert`| +|\bigodot|$\bigodot$|| +|\bigominus|Not supported|[Issue #1222](https://github.com/KaTeX/KaTeX/issues/1222)| +|\bigoplus|$\bigoplus$|| +|\bigoslash|Not supported|[Issue #1222](https://github.com/KaTeX/KaTeX/issues/1222)| +|\bigotimes|$\bigotimes$|| +|\bigr|$\bigr)$|`\bigr)`| +|\Bigr|$\Bigr)$|`\Bigr)`| +|\bigsqcap|Not supported|[Issue #1222](https://github.com/KaTeX/KaTeX/issues/1222)| +|\bigsqcup|$\bigsqcup$|| +|\bigstar|$\bigstar$|| +|\bigtriangledown|$\bigtriangledown$|| +|\bigtriangleup|$\bigtriangleup$|| +|\biguplus|$\biguplus$|| +|\bigvee|$\bigvee$|| +|\bigwedge|$\bigwedge$|| +|\binom|$\binom n k$|`\binom n k`| +|\blacklozenge|$\blacklozenge$|| +|\blacksquare|$\blacksquare$|| +|\blacktriangle|$\blacktriangle$|| +|\blacktriangledown|$\blacktriangledown$|| +|\blacktriangleleft|$\blacktriangleleft$|| +|\blacktriangleright|$\blacktriangleright$|| +|\bm|$\bm{AaBb}$|`\bm{AaBb}`| +|{Bmatrix}|$\begin{Bmatrix}a&b\\c&d\end{Bmatrix}$|`\begin{Bmatrix}`
   `a & b \\`
   `c & d`
`\end{Bmatrix}`| +|{Bmatrix*}|$\begin{Bmatrix*}[r]0&-1\\-1&0\end{Bmatrix*}$|`\begin{Bmatrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{Bmatrix*}`| +|{bmatrix}|$\begin{bmatrix}a&b\\c&d\end{bmatrix}$|`\begin{bmatrix}`
   `a & b \\`
   `c & d`
`\end{bmatrix}`| +|{bmatrix*}|$\begin{bmatrix*}[r]0&-1\\-1&0\end{bmatrix*}$|`\begin{bmatrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{bmatrix*}`| +|\bmod|$a \bmod b$|`a \bmod b`| +|\bold|$\bold{AaBb123}$|`\bold{AaBb123}`| +|\boldsymbol|$\boldsymbol{AaBb}$|`\boldsymbol{AaBb}`| +|\bot|$\bot$|| +|\bowtie|$\bowtie$|| +|\Box|$\Box$|| +|\boxdot|$\boxdot$|| +|\boxed|$\boxed{ab}$|`\boxed{ab}`| +|\boxminus|$\boxminus$|| +|\boxplus|$\boxplus$|| +|\boxtimes|$\boxtimes$|| +|\Bra|$\left\langle\psi\right\|$|`\Bra{\psi}`| +|\bra|$\mathinner{\langle{\psi}\|}$|`\bra{\psi}`| +|\braket|$\mathinner{\langle{\phi\|\psi}\rangle}$|`\braket{\phi|\psi}`| +|\brace|${n\brace k}$|`{n\brace k}`| +|\bracevert|Not supported|| +|\brack|${n\brack k}$|`{n\brack k}`| +|\breve|$\breve{eu}$|`\breve{eu}`| +|\buildrel|Not supported|| +|\bull|$\bull$|| +|\bullet|$\bullet$|| +|\Bumpeq|$\Bumpeq$|| +|\bumpeq|$\bumpeq$|| + +## C + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\C|Not supported|[Deprecated](https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax)| +|\cal|$\cal AaBb123$|`\cal AaBb123`| +|\cancel|$\cancel{5}$|`\cancel{5}`| +|\cancelto|Not supported|| +|\Cap|$\Cap$|| +|\cap|$\cap$|| +|{cases}|$\begin{cases}a&\text{if }b\\c&\text{if }d\end{cases}$|`\begin{cases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{cases}`| +|\cases|Not supported|see `{cases}`| +|{CD}|$$\begin{CD}A @>a>> B \\@VbVV @AAcA\\C @= D\end{CD}$$|`\begin{CD}`
   `A @>a>> B \\`
`@VbVV @AAcA \\`
   `C @= D`
`\end{CD}`| +|\cdot|$\cdot$|| +|\cdotp|$\cdotp$|| +|\cdots|$\cdots$|| +|\ce |${\mathrm{C}{\vphantom{X}}_{\smash[t]{6}}\mathrm{H}{\vphantom{X}}_{\smash[t]{5}}{-}\mathrm{CHO}}$|`\ce{C6H5-CHO}` Requires an [extension](https://github.com/KaTeX/KaTeX/tree/master/contrib/mhchem/)| +|\cee|Not supported|Deprecated by mhchem +|\centerdot|$a\centerdot b$|`a\centerdot b`| +|\cf|Not supported|Deprecated by mhchem; +use `\ce` instead| +|\cfrac|$\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}$|`\cfrac{2}{1+\cfrac{2}{1+\cfrac{2}{1}}}`| +|\char|$\char"263a$|`\char"263a`| +|\check|$\check{oe}$|`\check{oe}`| +|\ch|$\ch$|| +|\checkmark|$\checkmark$|| +|\Chi|$\Chi$|| +|\chi|$\chi$|| +|\choose|${n+1 \choose k+2}$|`{n+1 \choose k+2}`| +|\circ|$\circ$|| +|\circeq|$\circeq$|| +|\circlearrowleft|$\circlearrowleft$|| +|\circlearrowright|$\circlearrowright$|| +|\circledast|$\circledast$|| +|\circledcirc|$\circledcirc$|| +|\circleddash|$\circleddash$|| +|\circledR|$\circledR$|| +|\circledS|$\circledS$|| +|\class|Not supported|A PR is pending. +|\cline|Not supported|[Issue #269](https://github.com/KaTeX/KaTeX/issues/269)| +|\clubs|$\clubs$|| +|\clubsuit|$\clubsuit$|| +|\cnums|$\cnums$|| +|\colon|$\colon$|| +|\Colonapprox|$\Colonapprox$|| +|\colonapprox|$\colonapprox$|| +|\coloncolon|$\coloncolon$|| +|\coloncolonapprox|$\coloncolonapprox$|| +|\coloncolonequals|$\coloncolonequals$|| +|\coloncolonminus|$\coloncolonminus$|| +|\coloncolonsim|$\coloncolonsim$|| +|\Coloneq|$\Coloneq$|| +|\coloneq|$\coloneq$|| +|\colonequals|$\colonequals$|| +|\Coloneqq|$\Coloneqq$|| +|\coloneqq|$\coloneqq$|| +|\colonminus|$\colonminus$|| +|\Colonsim|$\Colonsim$|| +|\colonsim|$\colonsim$|| +|\color|$\color{#0000FF} AaBb123$|`\color{#0000FF} AaBb123`| +|\colorbox|$\colorbox{red}{Black on red}$|`\colorbox{red}{Black on red}`| +|\complement|$\complement$|| +|\Complex|$\Complex$|| +|\cong|$\cong$|| +|\Coppa|Not supported|| +|\coppa|Not supported|| +|\coprod|$\coprod$|| +|\copyright|$\copyright$|| +|\cos|$\cos$|| +|\cosec|$\cosec$|| +|\cosh|$\cosh$|| +|\cot|$\cot$|| +|\cotg|$\cotg$|| +|\coth|$\coth$|| +|\cr|$\begin{matrix} a & b\cr c & d \end{matrix}$|`\begin{matrix}`
   `a & b \cr`
   `c & d`
`\end{matrix}`| +|\csc|$\csc$|| +|\cssId|Not supported|A PR is pending. +|\ctg|$\ctg$|| +|\cth|$\cth$|| +|\Cup|$\Cup$|| +|\cup|$\cup$|| +|\curlyeqprec|$\curlyeqprec$|| +|\curlyeqsucc|$\curlyeqsucc$|| +|\curlyvee|$\curlyvee$|| +|\curlywedge|$\curlywedge$|| +|\curvearrowleft|$\curvearrowleft$|| +|\curvearrowright|$\curvearrowright$|| + +## D + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\dag|$\dag$|| +|\Dagger|$\Dagger$|| +|\dagger|$\dagger$|| +|\daleth|$\daleth$|| +|\Darr|$\Darr$|| +|\dArr|$\dArr$|| +|\darr|$\darr$|| +{darray}|$\begin{darray}{cc}a&b\\c&d\end{darray}$ | `\begin{darray}{cc}`
   `a & b \\`
   `c & d`
`\end{darray}`| +|\dashleftarrow|$\dashleftarrow$|| +|\dashrightarrow|$\dashrightarrow$|| +|\dashv|$\dashv$|| +|\dbinom|$\dbinom n k$|`\dbinom n k`| +|\dblcolon|$\dblcolon$|| +|{dcases}|$\begin{dcases}a&\text{if }b\\c&\text{if }d\end{dcases}$|`\begin{dcases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{dcases}`| +|\ddag|$\ddag$|| +|\ddagger|$\ddagger$|| +|\ddddot|Not supported|| +|\dddot|Not supported|| +|\ddot|$\ddot x$|`\ddot x`| +|\ddots|$\ddots$|| +|\DeclareMathOperator|Not supported|| +|\def|$\def\foo{x^2} \foo + \foo$|`\def\foo{x^2} \foo + \foo`| +|\definecolor|Not supported|[Issue #750](https://github.com/KaTeX/KaTeX/issues/750)| +|\deg|$\deg$|| +|\degree|$\degree$|| +|\delta|$\delta$|| +|\Delta|$\Delta$|| +|\det|$\det$|| +|\Digamma|Not supported|| +|\digamma|$\digamma$|| +|\dfrac|$\dfrac{a-1}{b-1}$|`\dfrac{a-1}{b-1}`| +|\diagdown|$\diagdown$|| +|\diagup|$\diagup$|| +|\Diamond|$\Diamond$|| +|\diamond|$\diamond$|| +|\diamonds|$\diamonds$|| +|\diamondsuit|$\diamondsuit$|| +|\dim|$\dim$|| +|\displaylines|Not supported|| +|\displaystyle|$\displaystyle\sum_0^n$|`\displaystyle\sum_0^n`| +|\div|$\div$|| +|\divideontimes|$\divideontimes$|| +|\dot|$\dot x$|`\dot x`| +|\Doteq|$\Doteq$|| +|\doteq|$\doteq$|| +|\doteqdot|$\doteqdot$|| +|\dotplus|$\dotplus$|| +|\dots|$x_1 + \dots + x_n$|`x_1 + \dots + x_n`| +|\dotsb|$x_1 +\dotsb + x_n$|`x_1 +\dotsb + x_n`| +|\dotsc|$x,\dotsc,y$|`x,\dotsc,y`| +|\dotsi|$$\int_{A_1}\int_{A_2}\dotsi$$|`\int_{A_1}\int_{A_2}\dotsi`| +|\dotsm|$x_1 x_2 \dotsm x_n$|`$x_1 x_2 \dotsm x_n`| +|\dotso|$\dotso$|| +|\doublebarwedge|$\doublebarwedge$|| +|\doublecap|$\doublecap$|| +|\doublecup|$\doublecup$|| +|\Downarrow|$\Downarrow$|| +|\downarrow|$\downarrow$|| +|\downdownarrows|$\downdownarrows$|| +|\downharpoonleft|$\downharpoonleft$|| +|\downharpoonright|$\downharpoonright$|| +|{drcases}|$\begin{drcases}a&\text{if }b\\c&\text{if }d\end{drcases}$|`\begin{drcases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{drcases}`| + +## E + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\edef|$\def\foo{a}\edef\bar{\foo}\def\foo{}\bar$|`\def\foo{a}\edef\bar{\foo}\def\foo{}\bar`| +|\ell|$\ell$|| +|\else|Not supported|[Issue #1003](https://github.com/KaTeX/KaTeX/issues/1003)| +|\em|Not supported|| +|\emph|Not supported|| +|\empty|$\empty$|| +|\emptyset|$\emptyset$|| +|\enclose|Not supported|Non standard +|\end|$\begin{matrix} a & b\\ c & d\end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}`| +|\endgroup|${a\endgroup$|`{a\endgroup`| +|\enspace|$a\enspace b$|`a\enspace b`| +|\Epsilon|$\Epsilon$|| +|\epsilon|$\epsilon$|| +|\eqalign|Not supported|| +|\eqalignno|Not supported|| +|\eqcirc|$\eqcirc$|| +|\Eqcolon|$\Eqcolon$|| +|\eqcolon|$\eqcolon$|| +|{equation}|$$\begin{equation}a = b + c\end{equation}$$|`\begin{equation}`
   `a = b + c`
`\end{equation}`| +|{equation*}|$$\begin{equation*}a = b + c\end{equation*}$$|`\begin{equation*}`
   `a = b + c`
`\end{equation*}`| +|{eqnarray}|Not supported|| +|\Eqqcolon|$\Eqqcolon$|| +|\eqqcolon|$\eqqcolon$|| +|\eqref|Not supported|[Issue #350](https://github.com/KaTeX/KaTeX/issues/350)| +|\eqsim|$\eqsim$|| +|\eqslantgtr|$\eqslantgtr$|| +|\eqslantless|$\eqslantless$|| +|\equalscolon|$\equalscolon$|| +|\equalscoloncolon|$\equalscoloncolon$|| +|\equiv|$\equiv$|| +|\Eta|$\Eta$|| +|\eta|$\eta$|| +|\eth|$\eth$|| +|\euro|Not supported|| +|\exist|$\exist$|| +|\exists|$\exists$|| +|\exp|$\exp$|| +|\expandafter||| + +## F + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\fallingdotseq|$\fallingdotseq$|| +|\fbox|$\fbox{Hi there!}$|`\fbox{Hi there!}`| +|\fcolorbox|$\fcolorbox{red}{aqua}{A}$|`\fcolorbox{red}{aqua}{A}`| +|\fi|Not supported|[Issue #1003](https://github.com/KaTeX/KaTeX/issues/1003)| +|\Finv|$\Finv$|| +|\flat|$\flat$|| +|\footnotesize|$\footnotesize footnotesize$|`\footnotesize footnotesize`| +|\forall|$\forall$|| +|\frac|$\frac a b$|`\frac a b`| +|\frak|$\frak{AaBb}$|`\frak{AaBb}`| +|\frown|$\frown$|| +|\futurelet||| + +## G + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\Game|$\Game$|| +|\Gamma|$\Gamma$|| +|\gamma|$\gamma$|| +|{gather}|$$\begin{gather}a=b\\e=b+c\end{gather}$$|`\begin{gather}`
   `a=b \\ `
   `e=b+c`
`\end{gather}`| +|{gathered}|$\begin{gathered}a=b\\e=b+c\end{gathered}$|`\begin{gathered}`
   `a=b \\ `
   `e=b+c`
`\end{gathered}`| +|\gcd|$\gcd$|| +|\gdef|$\gdef\bar#1{#1^2} \bar{y} + \bar{y}$|`\gdef\bar#1{#1^2} \bar{y} + \bar{y}`| +|\ge|$\ge$|| +|\geneuro|Not supported|| +|\geneuronarrow|Not supported|| +|\geneurowide|Not supported|| +|\genfrac|$\genfrac ( ] {2pt}{0}a{a+1}$|`\genfrac ( ] {2pt}{0}a{a+1}`| +|\geq|$\geq$|| +|\geqq|$\geqq$|| +|\geqslant|$\geqslant$|| +|\gets|$\gets$|| +|\gg|$\gg$|| +|\ggg|$\ggg$|| +|\gggtr|$\gggtr$|| +|\gimel|$\gimel$|| +|\global|$\global\def\add#1#2{#1+#2} \add 2 3$|`\global\def\add#1#2{#1+#2} \add 2 3`| +|\gnapprox|$\gnapprox$|| +|\gneq|$\gneq$|| +|\gneqq|$\gneqq$|| +|\gnsim|$\gnsim$|| +|\grave|$\grave{eu}$|`\grave{eu}`| +|\gt|$a \gt b$|`a \gt b`| +|\gtrdot|$\gtrdot$|| +|\gtrapprox|$\gtrapprox$|| +|\gtreqless|$\gtreqless$|| +|\gtreqqless|$\gtreqqless$|| +|\gtrless|$\gtrless$|| +|\gtrsim|$\gtrsim$|| +|\gvertneqq|$\gvertneqq$|| + +## H + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\H|$\text{\H{a}}$|`\text{\H{a}}`| +|\Harr|$\Harr$|| +|\hArr|$\hArr$|| +|\harr|$\harr$|| +|\hat|$\hat{\theta}$|`\hat{\theta}`| +|\hbar|$\hbar$|| +|\hbox|$\hbox{$x^2$}$|`\hbox{$x^2$}`| +|\hbox to | Not supported || +|\hdashline|$\begin{matrix}a&b\\ \hdashline c &d\end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `\hdashline`
   `c & d`
`\end{matrix}`| +|\hearts|$\hearts$|| +|\heartsuit|$\heartsuit$|| +|\hfil|Not supported|| +|\hfill|Not supported|Issues [#164](https://github.com/KaTeX/KaTeX/issues/164) & [#269](https://github.com/KaTeX/KaTeX/issues/269)| +|\hline|$\begin{matrix}a&b\\ \hline c &d\end{matrix}$|`\begin{matrix}`
   `a & b \\ \hline`
   `c & d`
`\end{matrix}`| +|\hom|$\hom$|| +|\hookleftarrow|$\hookleftarrow$|| +|\hookrightarrow|$\hookrightarrow$|| +|\hphantom|$a\hphantom{bc}d$|`a\hphantom{bc}d`| +|\href|$\href{https://katex.org/}{\KaTeX}$|`\href{https://katex.org/}{\KaTeX}` Requires `trust` [option](options.md)| +|\hskip|$w\hskip1em i\hskip2em d$|`w\hskip1em i\hskip2em d`| +|\hslash|$\hslash$|| +|\hspace|$s\hspace7ex k$|`s\hspace7ex k`| +|\htmlClass|$\htmlClass{foo}{x}$|`\htmlClass{foo}{x}` Must enable `trust` and disable `strict` [option](options.md)| +|\htmlData|$\htmlData{foo=a, bar=b}{x}$|`\htmlData{foo=a, bar=b}{x}` Must enable `trust` and disable `strict` [option](options.md)| +|\htmlId|$\htmlId{bar}{x}$|`\htmlId{bar}{x}` Must enable `trust` and disable `strict` [option](options.md)| +|\htmlStyle|$\htmlStyle{color: red;}{x}$|`\htmlStyle{color: red;}{x}` Must enable `trust` and disable `strict` [option](options.md)| +|\huge|$\huge huge$|`\huge huge`| +|\Huge|$\Huge Huge$|`\Huge Huge`| + +## I + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\i|$\text{\i}$|`\text{\i}`| +|\idotsint|Not supported|| +|\iddots|Not supported|[Issue #1223](https://github.com/KaTeX/KaTeX/issues/1223)| +|\if|Not supported|[Issue #1003](https://github.com/KaTeX/KaTeX/issues/1003)| +|\iff|$A\iff B$|`A\iff B`| +|\ifmode|Not supported|[Issue #1003](https://github.com/KaTeX/KaTeX/issues/1003)| +|\ifx|Not supported|[Issue #1003](https://github.com/KaTeX/KaTeX/issues/1003)| +|\iiiint|Not supported|| +|\iiint|$\iiint$|| +|\iint|$\iint$|| +|\Im|$\Im$|| +|\image|$\image$|| +|\imageof|$\imageof$|| +|\imath|$\imath$|| +|\impliedby|$P\impliedby Q$|`P\impliedby Q`| +|\implies|$P\implies Q$|`P\implies Q`| +|\in|$\in$|| +|\includegraphics|$\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://cdn.kastatic.org/images/apple-touch-icon-57x57-precomposed.new.png}$|`\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://cdn.kastatic.org/images/apple-touch-icon-57x57-precomposed.new.png}` Requires `trust` [option](options.md) +|\inf|$\inf$|| +|\infin|$\infin$|| +|\infty|$\infty$|| +|\injlim|$\injlim$| `\injlim` | +|\int|$\int$|| +|\intercal|$\intercal$|| +|\intop|$\intop$|| +|\Iota|$\Iota$|| +|\iota|$\iota$|| +|\isin|$\isin$|| +|\it|${\it AaBb}$|`{\it AaBb}`| +|\itshape|Not supported|| + +## JK + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\j|$\text{\j}$|`\text{\j}`| +|\jmath|$\jmath$|| +|\Join|$\Join$|| +|\Kappa|$\Kappa$|| +|\kappa|$\kappa$|| +|\KaTeX|$\KaTeX$|| +|\ker|$\ker$|| +|\kern|$I\kern-2.5pt R$|`I\kern-2.5pt R`| +|\Ket|$\left\|\psi\right\rangle$|`\Ket{\psi}`| +|\ket|$\mathinner{\|{\psi}\rangle}$|`\ket{\psi}`| +|\Koppa|Not supported|| +|\koppa|Not supported|| + +## L + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\L|Not supported|| +|\l|Not supported|| +|\Lambda|$\Lambda$|| +|\lambda|$\lambda$|| +|\label|Not supported|| +|\land|$\land$|| +|\lang|$\lang A\rangle$|`\lang A\rangle`| +|\langle|$\langle A\rangle$|`\langle A\rangle`| +|\Larr|$\Larr$|| +|\lArr|$\lArr$|| +|\larr|$\larr$|| +|\large|$\large large$|`\large large`| +|\Large|$\Large Large$|`\Large Large`| +|\LARGE|$\LARGE LARGE$|`\LARGE LARGE`| +|\LaTeX|$\LaTeX$|| +|\lBrace|$\lBrace$|| +|\lbrace|$\lbrace$|| +|\lbrack|$\lbrack$|| +|\lceil|$\lceil$|| +|\ldotp|$\ldotp$|| +|\ldots|$\ldots$|| +|\le|$\le$|| +|\leadsto|$\leadsto$|| +|\left|$\left\lbrace \dfrac ab \right.$|`\left\lbrace \dfrac ab \right.`| +|\leftarrow|$\leftarrow$|| +|\Leftarrow|$\Leftarrow$|| +|\LeftArrow|Not supported|Non standard +|\leftarrowtail|Not supported|| +|\leftharpoondown|$\leftharpoondown$|| +|\leftharpoonup|$\leftharpoonup$|| +|\leftleftarrows|$\leftleftarrows$|| +|\Leftrightarrow|$\Leftrightarrow$|| +|\leftrightarrow|$\leftrightarrow$|| +|\leftrightarrows|$\leftrightarrows$|| +|\leftrightharpoons|$\leftrightharpoons$|| +|\leftrightsquigarrow|$\leftrightsquigarrow$|| +|\leftroot|Not supported|| +|\leftthreetimes|$\leftthreetimes$|| +|\leq|$\leq$|| +|\leqalignno|Not supported|| +|\leqq|$\leqq$|| +|\leqslant|$\leqslant$|| +|\lessapprox|$\lessapprox$|| +|\lessdot|$\lessdot$|| +|\lesseqgtr|$\lesseqgtr$|| +|\lesseqqgtr|$\lesseqqgtr$|| +|\lessgtr|$\lessgtr$|| +|\lesssim|$\lesssim$|| +|\let||| +|\lfloor|$\lfloor$|| +|\lg|$\lg$|| +|\lgroup|$\lgroup$|| +|\lhd|$\lhd$|| +|\lim|$\lim$|| +|\liminf|$\liminf$|| +|\limits|$\lim\limits_x$|`\lim\limits_x`| +|\limsup|$\limsup$|| +|\ll|$\ll$|| +|\llap|${=}\llap{/\,}$|`{=}\llap{/\,}`| +|\llbracket|$\llbracket$|| +|\llcorner|$\llcorner$|| +|\Lleftarrow|$\Lleftarrow$|| +|\lll|$\lll$|| +|\llless|$\llless$|| +|\lmoustache|$\lmoustache$|| +|\ln|$\ln$|| +|\lnapprox|$\lnapprox$|| +|\lneq|$\lneq$|| +|\lneqq|$\lneqq$|| +|\lnot|$\lnot$|| +|\lnsim|$\lnsim$|| +|\log|$\log$|| +|\long||| +|\Longleftarrow|$\Longleftarrow$|| +|\longleftarrow|$\longleftarrow$|| +|\Longleftrightarrow|$\Longleftrightarrow$|| +|\longleftrightarrow|$\longleftrightarrow$|| +|\longmapsto|$\longmapsto$|| +|\Longrightarrow|$\Longrightarrow$|| +|\longrightarrow|$\longrightarrow$|| +|\looparrowleft|$\looparrowleft$|| +|\looparrowright|$\looparrowright$|| +|\lor|$\lor$|| +|\lower|Not supported|| +|\lozenge|$\lozenge$|| +|\lparen|$\lparen$|| +|\Lrarr|$\Lrarr$|| +|\lrArr|$\lrArr$|| +|\lrarr|$\lrarr$|| +|\lrcorner|$\lrcorner$|| +|\lq|$\lq$|| +|\Lsh|$\Lsh$|| +|\lt|$\lt$|| +|\ltimes|$\ltimes$|| +|\lVert|$\lVert$|| +|\lvert|$\lvert$|| +|\lvertneqq|$\lvertneqq$|| + +## M + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\maltese|$\maltese$|| +|\mapsto|$\mapsto$|| +|\mathbb|$\mathbb{AB}$|`\mathbb{AB}`
KaTeX supports A-Z k| +|\mathbf|$\mathbf{AaBb123}$|`\mathbf{AaBb123}`| +|\mathbin|$a\mathbin{!}b$|`a\mathbin{!}b`| +|\mathcal|$\mathcal{AaBb123}$|`\mathcal{AaBb123}`| +|\mathchoice|$a\mathchoice{\,}{\,\,}{\,\,\,}{\,\,\,\,}b$|`a\mathchoice{\,}{\,\,}{\,\,\,}{\,\,\,\,}b`| +|\mathclap|$\displaystyle\sum_{\mathclap{1\le i\le n}} x_{i}$|`\sum_{\mathclap{1\le i\le n}} x_{i}`| +|\mathclose|$a + (b\mathclose\gt + c$|`a + (b\mathclose\gt + c`| +|\mathellipsis|$\mathellipsis$|| +|\mathfrak|$\mathfrak{AaBb}$|`\mathfrak{AaBb}`
KaTeX supports A-Za-z| +|\mathinner|$ab\mathinner{\text{inside}}cd$|`ab\mathinner{\text{inside}}cd`| +|\mathit|$\mathit{AaBb}$|`\mathit{AaBb}`
KaTeX supports A-Za-z| +|\mathllap|${=}\mathllap{/\,}$|`{=}\mathllap{/\,}`| +|\mathnormal|$\mathnormal{AaBb}$|`\mathnormal{AaBb}`
KaTeX supports A-Za-z| +|\mathop|$\mathop{\star}_a^b$|`\mathop{\star}_a^b`| +|\mathopen|$a + \mathopen\lt b) + c$|`a + \mathopen\lt b) + c`| +|\mathord|$1\mathord{,}234{,}567$|`1\mathord{,}234{,}567`| +|\mathpunct|$A\mathpunct{-}B$|`A\mathpunct{-}B`| +|\mathrel|$a \mathrel{\#} b$|`a \mathrel{\#} b`| +|\mathrlap|$\mathrlap{\,/}{=}$|`\mathrlap{\,/}{=}`| +|\mathring|$\mathring{a}$|`\mathring{a}`| +|\mathrm|$\mathrm{AaBb123}$|`\mathrm{AaBb123}`| +|\mathscr|$\mathscr{AB}$|`\mathscr{AaBb123}`
KaTeX supports A-Z| +|\mathsf|$\mathsf{AaBb123}$|`\mathsf{AaBb123}`| +|\mathsterling|$\mathsterling$|| +|\mathstrut|$\sqrt{\mathstrut a}$|`\sqrt{\mathstrut a}`| +|\mathtip|Not supported|| +|\mathtt|$\mathtt{AaBb123}$|`\mathtt{AaBb123}`| +|\matrix|Not supported|See `{matrix}`| +|{matrix}|$\begin{matrix}a&b\\c&d\end{matrix}$|`\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}`| +|{matrix*}|$\begin{matrix*}[r]0&-1\\-1&0\end{matrix*}$|`\begin{matrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{matrix*}`| +|\max|$\max$|| +|\mbox|Not supported|| +|\md|Not supported|| +|\mdseries|Not supported|| +|\measuredangle|$\measuredangle$|| +|\medspace|$a\medspace b$|`a\medspace b`| +|\mho|$\mho$|| +|\mid|$\{x∈ℝ\mid x>0\}$|`\{x∈ℝ\mid x>0\}`| +|\middle|$P\left(A\middle\vert B\right)$|`P\left(A\middle\vert B\right)`| +|\min|$\min$|| +|\minuscolon|$\minuscolon$|| +|\minuscoloncolon|$\minuscoloncolon$|| +|\minuso|$\minuso$|| +|\mit|Not supported|See `\mathit`| +|\mkern|$a\mkern18mu b$|`a\mkern18mu b`| +|\mmlToken|Not supported|| +|\mod|$3\equiv 5 \mod 2$|`3\equiv 5 \mod 2`| +|\models|$\models$|| +|\moveleft|Not supported|| +|\moveright|Not supported|| +|\mp|$\mp$|| +|\mskip|$a\mskip{10mu}b$|`a\mskip{10mu}b`| +|\mspace|Not supported|| +|\Mu|$\Mu$|| +|\mu|$\mu$|| +|\multicolumn|Not supported|[Issue #269](https://github.com/KaTeX/KaTeX/issues/269)| +|{multiline}|Not supported|| +|\multimap|$\multimap$|| + +## N + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\N|$\N$|| +|\nabla|$\nabla$|| +|\natnums|$\natnums$|| +|\natural|$\natural$|| +|\negmedspace|$a\negmedspace b$|`a\negmedspace b`| +|\ncong|$\ncong$|| +|\ne|$\ne$|| +|\nearrow|$\nearrow$|| +|\neg|$\neg$|| +|\negthickspace|$a\negthickspace b$|`a\negthickspace b`| +|\negthinspace|$a\negthinspace b$|`a\negthinspace b`| +|\neq|$\neq$|| +|\newcommand|$\newcommand\chk{\checkmark} \chk$|`\newcommand\chk{\checkmark} \chk`| +|\newenvironment|Not supported|[Issue #37](https://github.com/KaTeX/KaTeX/issues/37)| +|\Newextarrow|Not supported|| +|\newline|$a\newline b$|`a\newline b`| +|\nexists|$\nexists$|| +|\ngeq|$\ngeq$|| +|\ngeqq|$\ngeqq$|| +|\ngeqslant|$\ngeqslant$|| +|\ngtr|$\ngtr$|| +|\ni|$\ni$|| +|\nleftarrow|$\nleftarrow$|| +|\nLeftarrow|$\nLeftarrow$|| +|\nLeftrightarrow|$\nLeftrightarrow$|| +|\nleftrightarrow|$\nleftrightarrow$|| +|\nleq|$\nleq$|| +|\nleqq|$\nleqq$|| +|\nleqslant|$\nleqslant$|| +|\nless|$\nless$|| +|\nmid|$\nmid$|| +|\nobreak||| +|\nobreakspace|$a\nobreakspace b$|`a\nobreakspace b`| +|\noexpand||| +|\nolimits|$\lim\nolimits_x$|`\lim\nolimits_x`| +|\normalfont|Not supported|| +|\normalsize|$\normalsize normalsize$|`\normalsize normalsize`| +|\not|$\not =$|`\not =`| +|\notag|Not supported|| +|\notin|$\notin$|| +|\notni|$\notni$|| +|\nparallel|$\nparallel$|| +|\nprec|$\nprec$|| +|\npreceq|$\npreceq$|| +|\nRightarrow|$\nRightarrow$|| +|\nrightarrow|$\nrightarrow$|| +|\nshortmid|$\nshortmid$|| +|\nshortparallel|$\nshortparallel$|| +|\nsim|$\nsim$|| +|\nsubseteq|$\nsubseteq$|| +|\nsubseteqq|$\nsubseteqq$|| +|\nsucc|$\nsucc$|| +|\nsucceq|$\nsucceq$|| +|\nsupseteq|$\nsupseteq$|| +|\nsupseteqq|$\nsupseteqq$|| +|\ntriangleleft|$\ntriangleleft$|| +|\ntrianglelefteq|$\ntrianglelefteq$|| +|\ntriangleright|$\ntriangleright$|| +|\ntrianglerighteq|$\ntrianglerighteq$|| +|\Nu|$\Nu$|| +|\nu|$\nu$|| +|\nVDash|$\nVDash$|| +|\nVdash|$\nVdash$|| +|\nvDash|$\nvDash$|| +|\nvdash|$\nvdash$|| +|\nwarrow|$\nwarrow$|| + +## O + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\O|$\text{\O}$|`\text{\O}`| +|\o|$\text{\o}$|`\text{\o}`| +|\odot|$\odot$|| +|\OE|$\text{\OE}$|`\text{\OE}`| +|\oe|$\text{\oe}$|`\text{\oe}`| +|\officialeuro|Not supported|| +|\oiiint|$\oiiint$|| +|\oiint|$\oiint$|| +|\oint|$\oint$|| +|\oldstyle|Not supported|| +|\omega|$\omega$|| +|\Omega|$\Omega$|| +|\Omicron|$\Omicron$|| +|\omicron|$\omicron$|| +|\ominus|$\ominus$|| +|\operatorname|$\operatorname{asin} x$|`\operatorname{asin} x`| +|\operatorname\*|$\operatorname*{asin}\limits_y x$|`\operatorname*{asin}\limits_y x`| +|\oplus|$\oplus$|| +|\or|Not supported|| +|\origof|$\origof$|| +|\oslash|$\oslash$|| +|\otimes|$\otimes$|| +|\over|${a+1 \over b+2}+c$|`{a+1 \over b+2}+c`| +|\overbrace|$\overbrace{x+⋯+x}^{n\text{ times}}$|`\overbrace{x+⋯+x}^{n\text{ times}}`| +|\overbracket|Not supported|| +|\overgroup|$\overgroup{AB}$|`\overgroup{AB}`| +|\overleftarrow|$\overleftarrow{AB}$|`\overleftarrow{AB}`| +|\overleftharpoon|$\overleftharpoon{AB}$|`\overleftharpoon{AB}`| +|\overleftrightarrow|$\overleftrightarrow{AB}$|`\overleftrightarrow{AB}`| +|\overline|$\overline{\text{a long argument}}$|`\overline{\text{a long argument}}`| +|\overlinesegment|$\overlinesegment{AB}$|`\overlinesegment{AB}`| +|\overparen|Not supported|See `\overgroup`| +|\Overrightarrow|$\Overrightarrow{AB}$|`\Overrightarrow{AB}`| +|\overrightarrow|$\overrightarrow{AB}$|`\overrightarrow{AB}`| +|\overrightharpoon|$\overrightharpoon{ac}$|`\overrightharpoon{ac}`| +|\overset|$\overset{!}{=}$|`\overset{!}{=}`| +|\overwithdelims|Not supported|| +|\owns|$\owns$|| + +## P + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\P|$\text{\P}$|`\text{\P}`| +|\pagecolor|Not supported|[Deprecated](https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax)| +|\parallel|$\parallel$|| +|\part|Not supported|[Deprecated](https://en.wikipedia.org/wiki/Help:Displaying_a_formula#Deprecated_syntax)| +|\partial|$\partial$|| +|\perp|$\perp$|| +|\phantom|$\Gamma^{\phantom{i}j}_{i\phantom{j}k}$|`\Gamma^{\phantom{i}j}_{i\phantom{j}k}`| +|\phase|$\phase{-78^\circ}$|`\phase{-78^\circ}`| +|\Phi|$\Phi$|| +|\phi|$\phi$|| +|\Pi|$\Pi$|| +|\pi|$\pi$|| +|{picture}|Not supported|| +|\pitchfork|$\pitchfork$|| +|\plim|$\plim$|| +|\plusmn|$\plusmn$|| +|\pm|$\pm$|| +|\pmatrix|Not supported|See `{pmatrix}`| +|{pmatrix}|$\begin{pmatrix}a&b\\c&d\end{pmatrix}$|`\begin{pmatrix}`
   `a & b \\`
   `c & d`
`\end{pmatrix}` +|{pmatrix*}|$\begin{pmatrix*}[r]0&-1\\-1&0\end{pmatrix*}$|`\begin{pmatrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{pmatrix*}`| +|\pmb|$\pmb{\mu}$|`\pmb{\mu}`| +|\pmod|$x\pmod a$|`x\pmod a`| +|\pod|$x \pod a$|`x \pod a`| +|\pounds|$\pounds$|| +|\Pr|$\Pr$|| +|\prec|$\prec$|| +|\precapprox|$\precapprox$|| +|\preccurlyeq|$\preccurlyeq$|| +|\preceq|$\preceq$|| +|\precnapprox|$\precnapprox$|| +|\precneqq|$\precneqq$|| +|\precnsim|$\precnsim$|| +|\precsim|$\precsim$|| +|\prime|$\prime$|| +|\prod|$\prod$|| +|\projlim|$\projlim$|`\projlim`| +|\propto|$\propto$|| +|\providecommand|$\providecommand\greet{\text{Hello}} \greet$|`\providecommand\greet{\text{Hello}} \greet`| +|\psi|$\psi$|| +|\Psi|$\Psi$|| +|\pu |${123~\mathchoice{\textstyle\frac{\mathrm{kJ}}{\mathrm{mol}}}{\frac{\mathrm{kJ}}{\mathrm{mol}}}{\frac{\mathrm{kJ}}{\mathrm{mol}}}{\frac{\mathrm{kJ}}{\mathrm{mol}}}}$|`\pu{123 kJ//mol}` Requires an [extension](https://github.com/KaTeX/KaTeX/tree/master/contrib/mhchem/)| + +## QR + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\Q|Not supported|See `\Bbb{Q}`| +|\qquad|$a\qquad\qquad{b}$|`a\qquad\qquad{b}`| +|\quad|$a\quad\quad{b}$|`a\quad\quad{b}`| +|\R|$\R$|| +|\r|$\text{\r{a}}$|`\text{\r{a}}`| +|\raise|Not supported|see `\raisebox`| +|\raisebox|$h\raisebox{2pt}{ighe}r$|`h\raisebox{2pt}{$ighe$}r`| +|\rang|$\langle A\rang$|`\langle A\rang`| +|\rangle|$\langle A\rangle$|`\langle A\rangle`| +|\Rarr|$\Rarr$|| +|\rArr|$\rArr$|| +|\rarr|$\rarr$|| +|\ratio|$\ratio$|| +|\rBrace|$\rBrace$|| +|\rbrace|$\rbrace$|| +|\rbrack|$\rbrack$|| +|{rcases}|$\begin{rcases}a&\text{if }b\\c&\text{if }d\end{rcases}$|`\begin{rcases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{rcases}`| +|\rceil|$\rceil$|| +|\Re|$\Re$|| +|\real|$\real$|| +|\Reals|$\Reals$|| +|\reals|$\reals$|| +|\ref|Not supported|[Issue #350](https://github.com/KaTeX/KaTeX/issues/350)| +|\relax||| +|\renewcommand|$\def\hail{Hi!}\renewcommand\hail{\text{Ahoy!}} \hail$|`\def\hail{Hi!}`
`\renewcommand\hail{\text{Ahoy!}}`
`\hail`| +|\renewenvironment|Not supported|| +|\require|Not supported|| +|\restriction|$\restriction$|| +|\rfloor|$\rfloor$|| +|\rgroup|$\rgroup$|| +|\rhd|$\rhd$|| +|\Rho|$\Rho$|| +|\rho|$\rho$|| +|\right|$\left.\dfrac a b\right)$|`\left.\dfrac a b\right)`| +|\Rightarrow|$\Rightarrow$|| +|\rightarrow|$\rightarrow$|| +|\rightarrowtail|$\rightarrowtail$|| +|\rightharpoondown|$\rightharpoondown$|| +|\rightharpoonup|$\rightharpoonup$|| +|\rightleftarrows|$\rightleftarrows$|| +|\rightleftharpoons|$\rightleftharpoons$|| +|\rightrightarrows|$\rightrightarrows$|| +|\rightsquigarrow|$\rightsquigarrow$|| +|\rightthreetimes|$\rightthreetimes$|| +|\risingdotseq|$\risingdotseq$|| +|\rlap|$\rlap{\,/}{=}$|`\rlap{\,/}{=}`| +|\rm|$\rm AaBb12$|`\rm AaBb12`| +|\rmoustache|$\rmoustache$|| +|\root|Not supported|| +|\rotatebox|Not supported|[Issue #681](https://github.com/KaTeX/KaTeX/issues/681)| +|\rparen|$\rparen$|| +|\rq|$\rq$|| +|\rrbracket|$\rrbracket$|| +|\Rrightarrow|$\Rrightarrow$|| +|\Rsh|$\Rsh$|| +|\rtimes|$\rtimes$|| +|\Rule|Not supported|see `\rule` +|\rule|$x\rule[6pt]{2ex}{1ex}x$|`x\rule[6pt]{2ex}{1ex}x`| +|\rVert|$\rVert$|| +|\rvert|$\rvert$|| + +## S + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\S|$\text{\S}$|`\text{\S}`| +|\Sampi|Not supported|| +|\sampi|Not supported|| +|\sc|Not supported|[Issue #471](https://github.com/KaTeX/KaTeX/issues/471)| +|\scalebox|Not supported|| +|\scr|Not supported|See `\mathscr`| +|\scriptscriptstyle|$\scriptscriptstyle \frac cd$|`\scriptscriptstyle \frac cd`| +|\scriptsize|$\scriptsize scriptsize$|`\scriptsize scriptsize`| +|\scriptstyle|$\frac ab + {\scriptstyle \frac cd}$|`\frac ab + {\scriptstyle \frac cd}`| +|\sdot|$\sdot$|| +|\searrow|$\searrow$|| +|\sec|$\sec$|| +|\sect|$\text{\sect}$|`\text{\sect}`| +|\setlength|Not supported|[Issue #687](https://github.com/KaTeX/KaTeX/issues/687)| +|\setminus|$\setminus$|| +|\sf|$\sf AaBb123$|`\sf AaBb123`| +|\sharp|$\sharp$|| +|\shortmid|$\shortmid$|| +|\shortparallel|$\shortparallel$|| +|\shoveleft|Not supported|| +|\shoveright|Not supported|| +|\sideset|Not supported|| +|\Sigma|$\Sigma$|| +|\sigma|$\sigma$|| +|\sim|$\sim$|| +|\simcolon|$\simcolon$|| +|\simcoloncolon|$\simcoloncolon$|| +|\simeq|$\simeq$|| +|\sin|$\sin$|| +|\sinh|$\sinh$|| +|\sixptsize|$\sixptsize sixptsize$|`\sixptsize sixptsize`| +|\sh|$\sh$|| +|\skew|Not supported|| +|\skip|Not supported|| +|\sl|Not supported|| +|\small|$\small small$|`\small small`| +|\smallfrown|$\smallfrown$|| +|\smallint|$\smallint$|| +|{smallmatrix}|$\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}$|`\begin{smallmatrix}`
   `a & b \\`
   `c & d`
`\end{smallmatrix}`| +|\smallsetminus|$\smallsetminus$|| +|\smallsmile|$\smallsmile$|| +|\smash|$\left(x^{\smash{2}}\right)$|`\left(x^{\smash{2}}\right)`| +|\smile|$\smile$|| +|\smiley|Not supported|| +|\sout|$\sout{abc}$|`\sout{abc}`| +|\Space|Not supported|see `\space` +|\space|$a\space b$|`a\space b`| +|\spades|$\spades$|| +|\spadesuit|$\spadesuit$|| +|\sphericalangle|$\sphericalangle$|| +|{split}|$$\begin{equation}\begin{split}a &=b+c\\&=e+f\end{split}\end{equation}$$|`\begin{equation}`
`\begin{split}`
   `a &=b+c\\`
      `&=e+f`
`\end{split}`
`\end{equation}`| +|\sqcap|$\sqcap$|| +|\sqcup|$\sqcup$|| +|\square|$\square$|| +|\sqrt|$\sqrt[3]{x}$|`\sqrt[3]{x}`| +|\sqsubset|$\sqsubset$|| +|\sqsubseteq|$\sqsubseteq$|| +|\sqsupset|$\sqsupset$|| +|\sqsupseteq|$\sqsupseteq$|| +|\ss|$\text{\ss}$|`\text{\ss}`| +|\stackrel|$\stackrel{!}{=}$|`\stackrel{!}{=}`| +|\star|$\star$|| +|\Stigma|Not supported|| +|\stigma|Not supported|| +|\strut|Not supported|| +|\style|Not supported|Non standard| +|\sub|$\sub$|| +|{subarray}|Not supported|| +|\sube|$\sube$|| +|\Subset|$\Subset$|| +|\subset|$\subset$|| +|\subseteq|$\subseteq$|| +|\subseteqq|$\subseteqq$|| +|\subsetneq|$\subsetneq$|| +|\subsetneqq|$\subsetneqq$|| +|\substack|$$\sum_{\substack{0Not supported|[Issue #471](https://github.com/KaTeX/KaTeX/issues/471)| +|\textsf|$\textsf{AaBb123}$|`\textsf{AaBb123}`| +|\textsl|Not supported|| +|\textsterling|$\text{\textsterling}$|`\text{\textsterling}`| +|\textstyle|$\textstyle\sum_0^n$|`\textstyle\sum_0^n`| +|\texttip|Not supported|| +|\texttt|$\texttt{AaBb123}$|`\texttt{AaBb123}`| +|\textunderscore|$\text{\textunderscore}$|`\text{\textunderscore}`| +|\textup|$\textup{AaBb123}$|`\textup{AaBb123}`| +|\textvisiblespace|Not supported|| +|\tfrac|$\tfrac ab$|`\tfrac ab`| +|\tg|$\tg$|| +|\th|$\th$|| +|\therefore|$\therefore$|| +|\Theta|$\Theta$|| +|\theta|$\theta$|| +|\thetasym|$\thetasym$|| +|\thickapprox|$\thickapprox$|| +|\thicksim|$\thicksim$|| +|\thickspace|$a\thickspace b$|`a\thickspace b`| +|\thinspace|$a\thinspace b$|`a\thinspace b`| +|\tilde|$\tilde M$|`\tilde M`| +|\times|$\times$|| +|\Tiny|Not supported|see `\tiny`| +|\tiny|$\tiny tiny$|`\tiny tiny`| +|\to|$\to$|| +|\toggle|Not supported|| +|\top|$\top$|| +|\triangle|$\triangle$|| +|\triangledown|$\triangledown$|| +|\triangleleft|$\triangleleft$|| +|\trianglelefteq|$\trianglelefteq$|| +|\triangleq|$\triangleq$|| +|\triangleright|$\triangleright$|| +|\trianglerighteq|$\trianglerighteq$|| +|\tt|${\tt AaBb123}$|`{\tt AaBb123}`| +|\twoheadleftarrow|$\twoheadleftarrow$|| +|\twoheadrightarrow|$\twoheadrightarrow$|| + +## U + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\u|$\text{\u{a}}$|`\text{\u{a}}`| +|\Uarr|$\Uarr$|| +|\uArr|$\uArr$|| +|\uarr|$\uarr$|| +|\ulcorner|$\ulcorner$|| +|\underbar|$\underbar{X}$|`\underbar{X}`| +|\underbrace|$\underbrace{x+⋯+x}_{n\text{ times}}$|`\underbrace{x+⋯+x}_{n\text{ times}}`| +|\underbracket|Not supported|| +|\undergroup|$\undergroup{AB}$|`\undergroup{AB}`| +|\underleftarrow|$\underleftarrow{AB}$|`\underleftarrow{AB}`| +|\underleftrightarrow|$\underleftrightarrow{AB}$|`\underleftrightarrow{AB}`| +|\underrightarrow|$\underrightarrow{AB}$|`\underrightarrow{AB}`| +|\underline|$\underline{\text{a long argument}}$|`\underline{\text{a long argument}}`| +|\underlinesegment|$\underlinesegment{AB}$|`\underlinesegment{AB}`| +|\underparen|Not supported|See `\undergroup`| +|\underrightarrow|$\underrightarrow{AB}$|`\underrightarrow{AB}`| +|\underset|$\underset{!}{=}$|`\underset{!}{=}`| +|\unicode|Not supported|| +|\unlhd|$\unlhd$|| +|\unrhd|$\unrhd$|| +|\up|Not supported|| +|\Uparrow|$\Uparrow$|| +|\uparrow|$\uparrow$|| +|\Updownarrow|$\Updownarrow$|| +|\updownarrow|$\updownarrow$|| +|\upharpoonleft|$\upharpoonleft$|| +|\upharpoonright|$\upharpoonright$|| +|\uplus|$\uplus$|| +|\uproot|Not supported|| +|\upshape|Not supported|| +|\Upsilon|$\Upsilon$|| +|\upsilon|$\upsilon$|| +|\upuparrows|$\upuparrows$|| +|\urcorner|$\urcorner$|| +|\url|$\footnotesize\url{https://katex.org/}$|`\url{https://katex.org/}` Requires `trust` [option](options.md)| +|\utilde|$\utilde{AB}$|`\utilde{AB}`| + +## V + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\v|$\text{\v{a}}$|`\text{\v{a}}`| +|\varcoppa|Not supported|| +|\varDelta|$\varDelta$|| +|\varepsilon|$\varepsilon$|| +|\varGamma|$\varGamma$|| +|\varinjlim|$\varinjlim$|`\varinjlim`| +|\varkappa|$\varkappa$|| +|\varLambda|$\varLambda$|| +|\varliminf|$\varliminf$|`\varliminf`| +|\varlimsup|$\varlimsup$|`\varlimsup`| +|\varnothing|$\varnothing$|| +|\varOmega|$\varOmega$|| +|\varPhi|$\varPhi$|| +|\varphi|$\varphi$|| +|\varPi|$\varPi$|| +|\varpi|$\varpi$|| +|\varprojlim|$\varprojlim$|`\varprojlim`| +|\varpropto|$\varpropto$|| +|\varPsi|$\varPsi$|| +|\varPsi|$\varPsi$|| +|\varrho|$\varrho$|| +|\varSigma|$\varSigma$|| +|\varsigma|$\varsigma$|| +|\varstigma|Not supported|| +|\varsubsetneq|$\varsubsetneq$|| +|\varsubsetneqq|$\varsubsetneqq$|| +|\varsupsetneq|$\varsupsetneq$|| +|\varsupsetneqq|$\varsupsetneqq$|| +|\varTheta|$\varTheta$|| +|\vartheta|$\vartheta$|| +|\vartriangle|$\vartriangle$|| +|\vartriangleleft|$\vartriangleleft$|| +|\vartriangleright|$\vartriangleright$|| +|\varUpsilon|$\varUpsilon$|| +|\varXi|$\varXi$|| +|\vcentcolon|$\mathrel{\vcentcolon =}$|`\mathrel{\vcentcolon =}`| +|\vcenter|$a+\left(\vcenter{\frac{\frac a b}c}\right)$|`a+\left(\vcenter{\hbox{$\frac{\frac a b}c$}}\right)`
TeX (strict) syntax| +|\vcenter|$a+\left(\vcenter{\frac{\frac a b}c}\right)$|`a+\left(\vcenter{\frac{\frac a b}c}\right)`
non-strict syntax| +|\Vdash|$\Vdash$|| +|\vDash|$\vDash$|| +|\vdash|$\vdash$|| +|\vdots|$\vdots$|| +|\vec|$\vec{F}$|`\vec{F}`| +|\vee|$\vee$|| +|\veebar|$\veebar$|| +|\verb|$\verb!\frac a b!$|`\verb!\frac a b!`| +|\Vert|$\Vert$|| +|\vert|$\vert$|| +|\vfil|Not supported|| +|\vfill|Not supported|| +|\vline|Not supported|[Issue #269](https://github.com/KaTeX/KaTeX/issues/269)| +|{Vmatrix}|$\begin{Vmatrix}a&b\\c&d\end{Vmatrix}$|`\begin{Vmatrix}`
   `a & b \\`
   `c & d`
`\end{Vmatrix}`| +|{Vmatrix*}|$\begin{Vmatrix*}[r]0&-1\\-1&0\end{Vmatrix*}$|`\begin{Vmatrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{Vmatrix*}`| +|{vmatrix}|$\begin{vmatrix}a&b\\c&d\end{vmatrix}$|`\begin{vmatrix}`
   `a & b \\`
   `c & d`
`\end{vmatrix}`| +|{vmatrix*}|$\begin{vmatrix*}[r]0&-1\\-1&0\end{vmatrix*}$|`\begin{vmatrix*}[r]`
   `0 & -1 \\`
   `-1 & 0`
`\end{vmatrix*}`| +|\vphantom|$\overline{\vphantom{M}a}$|`\overline{\vphantom{M}a}`| +|\Vvdash|$\Vvdash$|| + +## W + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\wedge|$\wedge$|| +|\weierp|$\weierp$|| +|\widecheck|$\widecheck{AB}$|`\widecheck{AB}`| +|\widehat|$\widehat{AB}$|`\widehat{AB}`| +|\wideparen|Not supported|[Issue #560](https://github.com/KaTeX/KaTeX/issues/560)| +|\widetilde|$\widetilde{AB}$|`\widetilde{AB}`| +|\wp|$\wp$|| +|\wr|$\wr$|| + +## X + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\xcancel|$\xcancel{ABC}$|`\xcancel{ABC}`| +|\xdef|$\def\foo{a}\xdef\bar{\foo}\def\foo{}\bar$|`\def\foo{a}\xdef\bar{\foo}\def\foo{}\bar`| +|\Xi|$\Xi$|| +|\xi|$\xi$|| +|\xhookleftarrow|$\xhookleftarrow{abc}$|`\xhookleftarrow{abc}`| +|\xhookrightarrow|$\xhookrightarrow{abc}$|`\xhookrightarrow{abc}`| +|\xLeftarrow|$\xLeftarrow{abc}$|`\xLeftarrow{abc}`| +|\xleftarrow|$\xleftarrow{abc}$|`\xleftarrow{abc}`| +|\xleftharpoondown|$\xleftharpoondown{abc}$|`\xleftharpoondown{abc}`| +|\xleftharpoonup|$\xleftharpoonup{abc}$|`\xleftharpoonup{abc}`| +|\xLeftrightarrow|$\xLeftrightarrow{abc}$|`\xLeftrightarrow{abc}`| +|\xleftrightarrow|$\xleftrightarrow{abc}$|`\xleftrightarrow{abc}`| +|\xleftrightharpoons|$\xleftrightharpoons{abc}$|`\xleftrightharpoons{abc}`| +|\xlongequal|$\xlongequal{abc}$|`\xlongequal{abc}`| +|\xmapsto|$\xmapsto{abc}$|`\xmapsto{abc}`| +|\xRightarrow|$\xRightarrow{abc}$|`\xRightarrow{abc}`| +|\xrightarrow|$\xrightarrow{abc}$|`\xrightarrow{abc}`| +|\xrightharpoondown|$\xrightharpoondown{abc}$|`\xrightharpoondown{abc}`| +|\xrightharpoonup|$\xrightharpoonup{abc}$|`\xrightharpoonup{abc}`| +|\xrightleftharpoons|$\xrightleftharpoons{abc}$|`\xrightleftharpoons{abc}`| +|\xtofrom|$\xtofrom{abc}$|`\xtofrom{abc}`| +|\xtwoheadleftarrow|$\xtwoheadleftarrow{abc}$|`\xtwoheadleftarrow{abc}`| +|\xtwoheadrightarrow|$\xtwoheadrightarrow{abc}$|`\xtwoheadrightarrow{abc}`| + +## YZ + +|Symbol/Function | Rendered | Source or Comment| +|:---------------|:------------|:-----------------| +|\yen|$\yen$|| +|\Z|$\Z$|| +|\Zeta|$\Zeta$|| +|\zeta|$\zeta$|| diff --git a/website/versioned_docs/version-0.13.0/supported.md b/website/versioned_docs/version-0.13.0/supported.md new file mode 100644 index 00000000..ca41a55b --- /dev/null +++ b/website/versioned_docs/version-0.13.0/supported.md @@ -0,0 +1,715 @@ +--- +id: version-0.13.0-supported +title: Supported Functions +original_id: supported +--- +This is a list of TeX functions supported by KaTeX. It is sorted into logical groups. + +There is a similar [Support Table](support_table.md), sorted alphabetically, that lists both supported and un-supported functions. + + + + +
+ +## Accents + +|||| +|:----------------------------|:----------------------------------------------------|:------ +|$a'$ `a'` |$\tilde{a}$ `\tilde{a}`|$\mathring{g}$ `\mathring{g}` +|$a''$ `a''`|$\widetilde{ac}$ `\widetilde{ac}` |$\overgroup{AB}$ `\overgroup{AB}` +|$a^{\prime}$ `a^{\prime}` |$\utilde{AB}$ `\utilde{AB}` |$\undergroup{AB}$ `\undergroup{AB}` +|$\acute{a}$ `\acute{a}`|$\vec{F}$ `\vec{F}` |$\Overrightarrow{AB}$ `\Overrightarrow{AB}` +|$\bar{y}$ `\bar{y}` |$\overleftarrow{AB}$ `\overleftarrow{AB}`|$\overrightarrow{AB}$ `\overrightarrow{AB}` +|$\breve{a}$ `\breve{a}`|$\underleftarrow{AB}$ `\underleftarrow{AB}` |$\underrightarrow{AB}$ `\underrightarrow{AB}` +|$\check{a}$ `\check{a}`|$\overleftharpoon{ac}$ `\overleftharpoon{ac}` |$\overrightharpoon{ac}$ `\overrightharpoon{ac}` +|$\dot{a}$ `\dot{a}` |$\overleftrightarrow{AB}$ `\overleftrightarrow{AB}` |$\overbrace{AB}$ `\overbrace{AB}` +|$\ddot{a}$ `\ddot{a}` |$\underleftrightarrow{AB}$ `\underleftrightarrow{AB}`|$\underbrace{AB}$ `\underbrace{AB}` +|$\grave{a}$ `\grave{a}`|$\overline{AB}$ `\overline{AB}` |$\overlinesegment{AB}$ `\overlinesegment{AB}` +|$\hat{\theta}$ `\hat{\theta}`|$\underline{AB}$ `\underline{AB}` |$\underlinesegment{AB}$ `\underlinesegment{AB}` +|$\widehat{ac}$ `\widehat{ac}`|$\widecheck{ac}$ `\widecheck{ac}` |$\underbar{X}$ `\underbar{X}` + +***Accent functions inside \\text{…}*** + +||||| +|:---------------------|:---------------------|:---------------------|:----- +|$\text{\'{a}}$ `\'{a}`|$\text{\~{a}}$ `\~{a}`|$\text{\.{a}}$ `\.{a}`|$\text{\H{a}}$ `\H{a}` +|$\text{\`{a}}$ \\`{a}|$\text{\={a}}$ `\={a}`|$\text{\"{a}}$ `\"{a}`|$\text{\v{a}}$ `\v{a}` +|$\text{\^{a}}$ `\^{a}`|$\text{\u{a}}$ `\u{a}`|$\text{\r{a}}$ `\r{a}`| + +See also [letters](#letters) + +## Delimiters + +|||||| +|:-----------------------------------|:---------------------------------------|:----------|:-------------------------------------------------------|:----- +|$(~)$ `( )` |$\lparen~\rparen$ `\lparen`
$~~~~$`\rparen`|$⌈~⌉$ `⌈ ⌉`|$\lceil~\rceil$ `\lceil`
$~~~~~$`\rceil` |$\uparrow$ `\uparrow` +|$[~]$ `[ ]` |$\lbrack~\rbrack$ `\lbrack`
$~~~~$`\rbrack`|$⌊~⌋$ `⌊ ⌋`|$\lfloor~\rfloor$ `\lfloor`
$~~~~~$`\rfloor` |$\downarrow$ `\downarrow` +|$\{ \}$ `\{ \}`|$\lbrace \rbrace$ `\lbrace`
$~~~~$`\rbrace`|$⎰⎱$ `⎰⎱` |$\lmoustache \rmoustache$ `\lmoustache`
$~~~~$`\rmoustache`|$\updownarrow$ `\updownarrow` +|$⟨~⟩$ `⟨ ⟩` |$\langle~\rangle$ `\langle`
$~~~~$`\rangle`|$⟮~⟯$ `⟮ ⟯`|$\lgroup~\rgroup$ `\lgroup`
$~~~~~$`\rgroup` |$\Uparrow$ `\Uparrow` +|$\vert$ | |$\vert$ `\vert` |$┌ ┐$ `┌ ┐`|$\ulcorner \urcorner$ `\ulcorner`
$~~~~$`\urcorner` |$\Downarrow$ `\Downarrow` +|$\Vert$ \| |$\Vert$ `\Vert` |$└ ┘$ `└ ┘`|$\llcorner \lrcorner$ `\llcorner`
$~~~~$`\lrcorner` |$\Updownarrow$ `\Updownarrow` +|$\lvert~\rvert$ `\lvert`
$~~~~$`\rvert`|$\lVert~\rVert$ `\lVert`
$~~~~~$`\rVert` |`\left.`| `\right.` |$\backslash$ `\backslash` +|$\lang~\rang$ `\lang`
$~~~~$`\rang`|$\lt~\gt$ `\lt \gt`|$⟦~⟧$ `⟦ ⟧`|$\llbracket~\rrbracket$ `\llbracket`
$~~~~$`\rrbracket`|$\lBrace~\rBrace$ `\lBrace \rBrace` + +**Delimiter Sizing** + +$\left(\LARGE{AB}\right)$ `\left(\LARGE{AB}\right)` + +$( \big( \Big( \bigg( \Bigg($ `( \big( \Big( \bigg( \Bigg(` + +|||||| +|:--------|:------|:--------|:-------|:------| +|`\left` |`\big` |`\bigl` |`\bigm` |`\bigr` +|`\middle`|`\Big` |`\Bigl` |`\Bigm` | `\Bigr` +|`\right` |`\bigg`|`\biggl` |`\biggm`|`\biggr` +| |`\Bigg`|`\Biggl` |`\Biggm`|`\Biggr` + +
+ +## Environments + +
+ +||||| +|:---------------------|:---------------------|:---------------------|:-------- +|$\begin{matrix} a & b \\ c & d \end{matrix}$ | `\begin{matrix}`
   `a & b \\`
   `c & d`
`\end{matrix}` |$\begin{array}{cc}a & b\\c & d\end{array}$ | `\begin{array}{cc}`
   `a & b \\`
   `c & d`
`\end{array}` +|$\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ |`\begin{pmatrix}`
   `a & b \\`
   `c & d`
`\end{pmatrix}` |$\begin{bmatrix} a & b \\ c & d \end{bmatrix}$ | `\begin{bmatrix}`
   `a & b \\`
   `c & d`
`\end{bmatrix}` +|$\begin{vmatrix} a & b \\ c & d \end{vmatrix}$ |`\begin{vmatrix}`
   `a & b \\`
   `c & d`
`\end{vmatrix}` |$\begin{Vmatrix} a & b \\ c & d \end{Vmatrix}$ |`\begin{Vmatrix}`
   `a & b \\`
   `c & d`
`\end{Vmatrix}` +|$\begin{Bmatrix} a & b \\ c & d \end{Bmatrix}$ |`\begin{Bmatrix}`
   `a & b \\`
   `c & d`
`\end{Bmatrix}`|$\def\arraystretch{1.5}\begin{array}{c:c:c} a & b & c \\ \hline d & e & f \\ \hdashline g & h & i \end{array}$|`\def\arraystretch{1.5}`
   `\begin{array}{c:c:c}`
   `a & b & c \\ \hline`
   `d & e & f \\`
   `\hdashline`
   `g & h & i`
`\end{array}` +|$x = \begin{cases} a &\text{if } b \\ c &\text{if } d \end{cases}$ |`x = \begin{cases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{cases}`|$\begin{rcases} a &\text{if } b \\ c &\text{if } d \end{rcases}⇒…$ |`\begin{rcases}`
   `a &\text{if } b \\`
   `c &\text{if } d`
`\end{rcases}⇒…`| +|$\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}$ | `\begin{smallmatrix}`
   `a & b \\`
   `c & d`
`\end{smallmatrix}` |$$\sum_{\begin{subarray}{l} i\in\Lambda\\  0`\begin{subarray}{l}`
   `i\in\Lambda\\`
   `0`\end{subarray}}`| + +The auto-render extension will render the following environments even if they are not inside math delimiters such as `$$…$$`. They are display-mode only. + + +
+ +||||| +|:---------------------|:---------------------|:---------------------|:-------- +|$$\begin{equation}\begin{split}a &=b+c\\&=e+f\end{split}\end{equation}$$ |`\begin{equation}`
`\begin{split}`   `a &=b+c\\`
      `&=e+f`
`\end{split}`
`\end{equation}` |$$\begin{align} a&=b+c \\ d+e&=f \end{align}$$ |`\begin{align}`
   `a&=b+c \\`
   `d+e&=f`
`\end{align}` | +|$$\begin{gather} a=b \\ e=b+c \end{gather}$$ |`\begin{gather}`
   `a=b \\ `
   `e=b+c`
`\end{gather}`|$$\begin{alignat}{2}10&x+&3&y=2\\3&x+&13&y=4\end{alignat}$$ | `\begin{alignat}{2}`
   `10&x+&3&y=2\\`
   `3&x+&13&y=4`
`\end{alignat}` +|$$\begin{CD}A @>a>> B \\@VbVV @AAcA\\C @= D\end{CD}$$ | `\begin{CD}`
   `A @>a>> B \\`
`@VbVV @AAcA \\`
   `C @= D`
`\\end{CD}` + +#### Other KaTeX Environments + +| Environments | How they differ from those shown above | +|:-----------------------------------------------|:------------------| +| `darray`, `dcases`, `drcases` | … apply `displaystyle` | +| `matrix*`, `pmatrix*`, `bmatrix*`
`Bmatrix*`, `vmatrix*`, `Vmatrix*` | … take an optional argument to set column
alignment, as in `\begin{matrix*}[r]` +| `equation*`, `gather*`
`align*`, `alignat*` | … have no automatic numbering. | +| `gathered`, `aligned`, `alignedat` | … do not need to be in display mode.
… have no automatic numbering.
… must be inside math delimiters in
order to be rendered by the auto-render
extension. | + +
+ +Acceptable line separators include: `\\`, `\cr`, `\\[distance]`, and `\cr[distance]`. *Distance* can be written with any of the [KaTeX units](#units). + +The `{array}` environment supports `|` and `:` vertical separators. + +The `{array}` environment does not yet support `\cline` or `\multicolumn`. + +`\tag` can not yet be applied to individual environment rows. + +
+ +## HTML + +The following "raw HTML" features are potentially dangerous for untrusted +inputs, so they are disabled by default, and attempting to use them produces +the command names in red (which you can configure via the `errorColor` +[option](options.md)). To fully trust your LaTeX input, you need to pass +an option of `trust: true`; you can also enable just some of the commands +or for just some URLs via the `trust` [option](options.md). + +||| +|:----------------|:-------------------| +| $\href{https://katex.org/}{\KaTeX}$ | `\href{https://katex.org/}{\KaTeX}` | +| $\url{https://katex.org/}$ | `\url{https://katex.org/}` | +| $\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://katex.org/img/khan-academy.png}$ | `\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://katex.org/img/khan-academy.png}` | +| $\htmlId{bar}{x}$ …<span id="bar" class="enclosing">…x…</span>… | `\htmlId{bar}{x}` | +| $\htmlClass{foo}{x}$ …<span class="enclosing foo">…x…</span>… | `\htmlClass{foo}{x}` | +| $\htmlStyle{color: red;}{x}$ …<span style="color: red;" class="enclosing">…x…</span>… | `\htmlStyle{color: red;}{x}` | +| $\htmlData{foo=a, bar=b}{x}$ …<span data-foo="a" data-bar="b" class="enclosing">…x…</span>… | `\htmlData{foo=a, bar=b}{x}` | + +`\includegraphics` supports `height`, `width`, `totalheight`, and `alt` in its first argument. `height` is required. + +HTML extension (`\html`-prefixed) commands are non-standard, so loosening `strict` option for `htmlExtension` is required. + + +## Letters and Unicode + +**Greek Letters** + +Direct Input: $Α Β Γ Δ Ε Ζ Η Θ Ι \allowbreak Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω$ +$\allowbreak α β γ δ ϵ ζ η θ ι κ λ μ ν ξ o π \allowbreak ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ ϝ$ + +||||| +|---------------|-------------|-------------|---------------| +| $\Alpha$ `\Alpha` | $\Beta$ `\Beta` | $\Gamma$ `\Gamma`| $\Delta$ `\Delta` +| $\Epsilon$ `\Epsilon` | $\Zeta$ `\Zeta` | $\Eta$ `\Eta` | $\Theta$ `\Theta` +| $\Iota$ `\Iota` | $\Kappa$ `\Kappa` | $\Lambda$ `\Lambda` | $\Mu$ `\Mu` +| $\Nu$ `\Nu` | $\Xi$ `\Xi` | $\Omicron$ `\Omicron` | $\Pi$ `\Pi` +| $\Rho$ `\Rho` | $\Sigma$ `\Sigma` | $\Tau$ `\Tau` | $\Upsilon$ `\Upsilon` +| $\Phi$ `\Phi` | $\Chi$ `\Chi` | $\Psi$ `\Psi` | $\Omega$ `\Omega` +| $\varGamma$ `\varGamma`| $\varDelta$ `\varDelta` | $\varTheta$ `\varTheta` | $\varLambda$ `\varLambda` | +| $\varXi$ `\varXi`| $\varPi$ `\varPi` | $\varSigma$ `\varSigma` | $\varUpsilon$ `\varUpsilon` | +| $\varPhi$ `\varPhi` | $\varPsi$ `\varPsi`| $\varOmega$ `\varOmega` || +| $\alpha$ `\alpha`| $\beta$ `\beta` | $\gamma$ `\gamma` | $\delta$ `\delta`| +| $\epsilon$ `\epsilon` | $\zeta$ `\zeta` | $\eta$ `\eta`| $\theta$ `\theta`| +| $\iota$ `\iota` | $\kappa$ `\kappa` | $\lambda$ `\lambda`| $\mu$ `\mu`| +| $\nu$ `\nu`| $\xi$ `\xi` | $\omicron$ `\omicron` | $\pi$ `\pi`| +| $\rho$ `\rho` | $\sigma$ `\sigma` | $\tau$ `\tau`| $\upsilon$ `\upsilon` | +| $\phi$ `\phi` | $\chi$ `\chi`| $\psi$ `\psi`| $\omega$ `\omega`| +| $\varepsilon$ `\varepsilon` | $\varkappa$ `\varkappa` | $\vartheta$ `\vartheta` | $\thetasym$ `\thetasym` +| $\varpi$ `\varpi`| $\varrho$ `\varrho` | $\varsigma$ `\varsigma` | $\varphi$ `\varphi` +| $\digamma $ `\digamma` + +**Other Letters** + +|||||| +|:----------|:----------|:----------|:----------|:----------| +|$\imath$ `\imath`|$\nabla$ `\nabla`|$\Im$ `\Im`|$\Reals$ `\Reals`|$\text{\OE}$ `\text{\OE}` +|$\jmath$ `\jmath`|$\partial$ `\partial`|$\image$ `\image`|$\wp$ `\wp`|$\text{\o}$ `\text{\o}` +|$\aleph$ `\aleph`|$\Game$ `\Game`|$\Bbbk$ `\Bbbk`|$\weierp$ `\weierp`|$\text{\O}$ `\text{\O}` +|$\alef$ `\alef`|$\Finv$ `\Finv`|$\N$ `\N`|$\Z$ `\Z`|$\text{\ss}$ `\text{\ss}` +|$\alefsym$ `\alefsym`|$\cnums$ `\cnums`|$\natnums$ `\natnums`|$\text{\aa}$ `\text{\aa}`|$\text{\i}$ `\text{\i}` +|$\beth$ `\beth`|$\Complex$ `\Complex`|$\R$ `\R`|$\text{\AA}$ `\text{\AA}`|$\text{\j}$ `\text{\j}` +|$\gimel$ `\gimel`|$\ell$ `\ell`|$\Re$ `\Re`|$\text{\ae}$ `\text{\ae}` +|$\daleth$ `\daleth`|$\hbar$ `\hbar`|$\real$ `\real`|$\text{\AE}$ `\text{\AE}` +|$\eth$ `\eth`|$\hslash$ `\hslash`|$\reals$ `\reals`|$\text{\oe}$ `\text{\oe}` + +Direct Input: $∂ ∇ ℑ Ⅎ ℵ ℶ ℷ ℸ ⅁ ℏ ð$ +ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåçèéêëìíîïðñòóôöùúûüýþÿ + +
+
+ +**Unicode Mathematical Alphanumeric Symbols** + +| Item | Range | Item | Range | +|-------------|---------------------|-------------------|---------------| +| Bold | $\text{𝐀-𝐙 𝐚-𝐳 𝟎-𝟗}$ | Double-struck | $\text{𝔸-}ℤ\ 𝕜$ +| Italic | $\text{𝐴-𝑍 𝑎-𝑧}$ | Sans serif | $\text{𝖠-𝖹 𝖺-𝗓 𝟢-𝟫}$ +| Bold Italic | $\text{𝑨-𝒁 𝒂-𝒛}$ | Sans serif bold | $\text{𝗔-𝗭 𝗮-𝘇 𝟬-𝟵}$ +| Script | $\text{𝒜-𝒵}$ | Sans serif italic | $\text{𝘈-𝘡 𝘢-𝘻}$ +| Fractur | $\text{𝔄-}ℨ\text{ 𝔞-𝔷}$| Monospace | $\text{𝙰-𝚉 𝚊-𝚣 𝟶-𝟿}$ + +
+
+ +**Unicode** + +The letters listed above will render properly in any KaTeX rendering mode. + +In addition, Armenian, Brahmic, Georgian, Chinese, Japanese, and Korean glyphs are always accepted in text mode. However, these glyphs will be rendered from system fonts (not KaTeX-supplied fonts) so their typography may clash. +You can provide rules for CSS classes `.latin_fallback`, `.cyrillic_fallback`, `.brahmic_fallback`, `.georgian_fallback`, `.cjk_fallback`, and `.hangul_fallback` to provide fallback fonts for these languages. +Use of these glyphs may cause small vertical alignment issues: KaTeX has detailed metrics for listed symbols and most Latin, Greek, and Cyrillic letters, but other accepted glyphs are treated as if they are each as tall as the letter M in the current KaTeX font. + +If the KaTeX rendering mode is set to `strict: false` or `strict: "warn"` (default), then KaTeX will accept all Unicode letters in both text and math mode. +All unrecognized characters will be treated as if they appeared in text mode, and are subject to the same issues of using system fonts and possibly using incorrect vertical alignment. + +For Persian composite characters, a user-supplied [plug-in](https://github.com/HosseinAgha/persian-katex-plugin) is under development. + +Any character can be written with the `\char` function and the Unicode code in hex. For example `\char"263a` will render as $\char"263a$. + +## Layout + +### Annotation + +||| +|:------------------------------|:----- +|$\cancel{5}$ `\cancel{5}`|$\overbrace{a+b+c}^{\text{note}}$ `\overbrace{a+b+c}^{\text{note}}` +|$\bcancel{5}$ `\bcancel{5}` |$\underbrace{a+b+c}_{\text{note}}$ `\underbrace{a+b+c}_{\text{note}}` +|$\xcancel{ABC}$ `\xcancel{ABC}`|$\not =$ `\not =` +|$\sout{abc}$ `\sout{abc}`|$\boxed{\pi=\frac c d}$ `\boxed{\pi=\frac c d}` +|$a_{\angl n}$ `$a_{\angl n}`|$a_\angln$ `a_\angln` +|$\phase{-78^\circ}$`\phase{-78^\circ}` | + +`\tag{hi} x+y^{2x}` +$$\tag{hi} x+y^{2x}$$ + +`\tag*{hi} x+y^{2x}` +$$\tag*{hi} x+y^{2x}$$ + +### Line Breaks + +KaTeX 0.10.0+ will insert automatic line breaks in inline math after relations or binary operators such as “=” or “+”. These can be suppressed by `\nobreak` or by placing math inside a pair of braces, as in `{F=ma}`. `\allowbreak` will allow automatic line breaks at locations other than relations or operators. + +Hard line breaks are `\\` and `\newline`. + +In display math, KaTeX does not insert automatic line breaks. It ignores display math hard line breaks when rendering option `strict: true`. + +### Vertical Layout + +|||| +|:--------------|:----------------------------------------|:----- +|$x_n$ `x_n` |$\stackrel{!}{=}$ `\stackrel{!}{=}`| $a \atop b$ `a \atop b` +|$e^x$ `e^x` |$\overset{!}{=}$ `\overset{!}{=}` | $a\raisebox{0.25em}{$b$}c$ `a\raisebox{0.25em}{$b$}c` +|$_u^o $ `_u^o `| $\underset{!}{=}$ `\underset{!}{=}` | $a+\left(\vcenter{\frac{\frac a b}c}\right)$ `a+\left(\vcenter{\hbox{$\frac{\frac a b}c$}}\right)` +||| $$\sum_{\substack{0 +
+ +**Spacing** + +| Function | Produces | Function | Produces| +|:----------------|:-------------------|:---------------------|:--------------------------------------| +| `\,` | ³∕₁₈ em space | `\kern{distance}` | space, width = *distance* +| `\thinspace` | ³∕₁₈ em space | `\mkern{distance}` | space, width = *distance* +| `\>` | ⁴∕₁₈ em space | `\mskip{distance}` | space, width = *distance* +| `\:` | ⁴∕₁₈ em space | `\hskip{distance}` | space, width = *distance* +| `\medspace` | ⁴∕₁₈ em space | `\hspace{distance}` | space, width = *distance* +| `\;` | ⁵∕₁₈ em space | `\hspace*{distance}` | space, width = *distance* +| `\thickspace` | ⁵∕₁₈ em space | `\phantom{content}` | space the width and height of content +| `\enspace` | ½ em space | `\hphantom{content}` | space the width of content +| `\quad` | 1 em space | `\vphantom{content}` | a strut the height of content +| `\qquad` | 2 em space | `\!` | – ³∕₁₈ em space +| `~` | non-breaking space | `\negthinspace` | – ³∕₁₈ em space +| `\` | space | `\negmedspace` | – ⁴∕₁₈ em space +| `\nobreakspace` | non-breaking space | `\negthickspace` | – ⁵∕₁₈ em space +| `\space` | space | `\mathstrut` | `\vphantom{(}` + +
+ +**Notes:** + +`distance` will accept any of the [KaTeX units](#units). + +`\kern`, `\mkern`, `\mskip`, and `\hspace` accept unbraced distances, as in: `\kern1em`. + +`\mkern` and `\mskip` will not work in text mode and both will write a console warning for any unit except `mu`. + +
+ +## Logic and Set Theory + +||||| +|:--------------------|:--------------------------|:----------------------------|:----- +|$\forall$ `\forall` |$\complement$ `\complement`|$\therefore$ `\therefore` |$\emptyset$ `\emptyset` +|$\exists$ `\exists` |$\subset$ `\subset` |$\because$ `\because` |$\empty$ `\empty` +|$\exist$ `\exist` |$\supset$ `\supset` |$\mapsto$ `\mapsto` |$\varnothing$ `\varnothing` +|$\nexists$ `\nexists`|$\mid$ `\mid` |$\to$ `\to` |$\implies$ `\implies` +|$\in$ `\in` |$\land$ `\land` |$\gets$ `\gets` |$\impliedby$ `\impliedby` +|$\isin$ `\isin` |$\lor$ `\lor` |$\leftrightarrow$ `\leftrightarrow`|$\iff$ `\iff` +|$\notin$ `\notin` |$\ni$ `\ni` |$\notni$ `\notni` |$\neg$ `\neg` or `\lnot` + +Direct Input: $∀ ∴ ∁ ∵ ∃ ∣ ∈ ∉ ∋ ⊂ ⊃ ∧ ∨ ↦ → ← ↔ ¬$ ℂ ℍ ℕ ℙ ℚ ℝ + +## Macros + +||| +|:-------------------------------------|:------ +|$\def\foo{x^2} \foo + \foo$ | `\def\foo{x^2} \foo + \foo` +|$\gdef\bar#1{#1^2} \bar{y} + \bar{y}$ | `\gdef\bar#1{#1^2} \bar{y} + \bar{y}` +| | `\edef\macroname#1#2…{definition to be expanded}` +| | `\xdef\macroname#1#2…{definition to be expanded}` +| | `\let\foo=\bar` +| | `\futurelet\foo\bar x` +| | `\global\def\macroname#1#2…{definition}` +| | `\newcommand\macroname[numargs]{definition}` +| | `\renewcommand\macroname[numargs]{definition}` +| | `\providecommand\macroname[numargs]{definition}` + +Macros can also be defined in the KaTeX [rendering options](options.md). + +Macros accept up to nine arguments: #1, #2, etc. + +
+ +Macros defined by `\gdef`, `\xdef`, `\global\def`, `\global\edef`, `\global\let`, and `\global\futurelet` will persist between math expressions. (Exception: macro persistence may be disabled. There are legitimate security reasons for that.) + +KaTeX has no `\par`, so all macros are long by default and `\long` will be ignored. + +Available functions include: + +`\char` `\mathchoice` `\TextOrMath` `\@ifstar` `\@ifnextchar` `\@firstoftwo` `\@secondoftwo` `\relax` `\expandafter` `\noexpand` + +@ is a valid character for commands, as if `\makeatletter` were in effect. + +## Operators + +### Big Operators + +||||| +|------------------|-------------------------|--------------------------|--------------| +| $\sum$ `\sum` | $\prod$ `\prod` | $\bigotimes$ `\bigotimes`| $\bigvee$ `\bigvee` +| $\int$ `\int` | $\coprod$ `\coprod` | $\bigoplus$ `\bigoplus` | $\bigwedge$ `\bigwedge` +| $\iint$ `\iint` | $\intop$ `\intop` | $\bigodot$ `\bigodot` | $\bigcap$ `\bigcap` +| $\iiint$ `\iiint`| $\smallint$ `\smallint` | $\biguplus$ `\biguplus` | $\bigcup$ `\bigcup` +| $\oint$ `\oint` | $\oiint$ `\oiint` | $\oiiint$ `\oiiint` | $\bigsqcup$ `\bigsqcup` + +Direct Input: $∫ ∬ ∭ ∮ ∏ ∐ ∑ ⋀ ⋁ ⋂ ⋃ ⨀ ⨁ ⨂ ⨄ ⨆$ ∯ ∰ + +### Binary Operators + +||||| +|-------------|-------------------|-------------------|--------------------| +| $+$ `+`| $\cdot$ `\cdot` | $\gtrdot$ `\gtrdot`| $x \pmod a$ `x \pmod a`| +| $-$ `-`| $\cdotp$ `\cdotp` | $\intercal$ `\intercal` | $x \pod a$ `x \pod a` | +| $/$ `/`| $\centerdot$ `\centerdot`| $\land$ `\land` | $\rhd$ `\rhd` | +| $*$ `*`| $\circ$ `\circ` | $\leftthreetimes$ `\leftthreetimes` | $\rightthreetimes$ `\rightthreetimes` | +| $\amalg$ `\amalg` | $\circledast$ `\circledast` | $\ldotp$ `\ldotp` | $\rtimes$ `\rtimes` | +| $\And$ `\And`| $\circledcirc$ `\circledcirc` | $\lor$ `\lor`| $\setminus$ `\setminus` | +| $\ast$ `\ast`| $\circleddash$ `\circleddash` | $\lessdot$ `\lessdot` | $\smallsetminus$ `\smallsetminus`| +| $\barwedge$ `\barwedge` | $\Cup$ `\Cup`| $\lhd$ `\lhd`| $\sqcap$ `\sqcap` | +| $\bigcirc$ `\bigcirc` | $\cup$ `\cup`| $\ltimes$ `\ltimes`| $\sqcup$ `\sqcup` | +| $\bmod$ `\bmod` | $\curlyvee$ `\curlyvee` | $x \mod a$ `x\mod a`| $\times$ `\times` | +| $\boxdot$ `\boxdot`| $\curlywedge$ `\curlywedge` | $\mp$ `\mp` | $\unlhd$ `\unlhd` | +| $\boxminus$ `\boxminus` | $\div$ `\div`| $\odot$ `\odot` | $\unrhd$ `\unrhd` | +| $\boxplus$ `\boxplus` | $\divideontimes$ `\divideontimes` | $\ominus$ `\ominus`| $\uplus$ `\uplus` | +| $\boxtimes$ `\boxtimes` | $\dotplus$ `\dotplus` | $\oplus$ `\oplus` | $\vee$ `\vee` | +| $\bullet$ `\bullet`| $\doublebarwedge$ `\doublebarwedge` | $\otimes$ `\otimes`| $\veebar$ `\veebar` | +| $\Cap$ `\Cap`| $\doublecap$ `\doublecap`| $\oslash$ `\oslash`| $\wedge$ `\wedge` | +| $\cap$ `\cap`| $\doublecup$ `\doublecup`| $\pm$ `\pm` or `\plusmn` | $\wr$ `\wr` | + +Direct Input: $+ - / * ⋅ ± × ÷ ∓ ∔ ∧ ∨ ∩ ∪ ≀ ⊎ ⊓ ⊔ ⊕ ⊖ ⊗ ⊘ ⊙ ⊚ ⊛ ⊝ ◯$ + +### Fractions and Binomials + +|||| +|:--------------------------|:----------------------------|:----- +|$\frac{a}{b}$ `\frac{a}{b}`|$\tfrac{a}{b}$ `\tfrac{a}{b}`|$\genfrac ( ] {2pt}{1}a{a+1}$ `\genfrac ( ] {2pt}{1}a{a+1}` +|${a \over b}$ `{a \over b}`|$\dfrac{a}{b}$ `\dfrac{a}{b}`|${a \above{2pt} b+1}$ `{a \above{2pt} b+1}` +|$a/b$ `a/b` | |$\cfrac{a}{1 + \cfrac{1}{b}}$ `\cfrac{a}{1 + \cfrac{1}{b}}` + +|||| +|:------------------------------|:------------------------------|:-------- +|$\binom{n}{k}$ `\binom{n}{k}` |$\dbinom{n}{k}$ `\dbinom{n}{k}`|${n\brace k}$ `{n\brace k}` +|${n \choose k}$ `{n \choose k}`|$\tbinom{n}{k}$ `\tbinom{n}{k}`|${n\brack k}$ `{n\brack k}` + +### Math Operators + +||||| +|:--------------------|:--------------------|:----------------|:--------------| +| $\arcsin$ `\arcsin` | $\cosec$ `\cosec` | $\deg$ `\deg` | $\sec$ `\sec` | +| $\arccos$ `\arccos` | $\cosh$ `\cosh` | $\dim$ `\dim` | $\sin$ `\sin` | +| $\arctan$ `\arctan` | $\cot$ `\cot` | $\exp$ `\exp` | $\sinh$ `\sinh` | +| $\arctg$ `\arctg` | $\cotg$ `\cotg` | $\hom$ `\hom` | $\sh$ `\sh` | +| $\arcctg$ `\arcctg` | $\coth$ `\coth` | $\ker$ `\ker` | $\tan$ `\tan` | +| $\arg$ `\arg` | $\csc$ `\csc` | $\lg$ `\lg` | $\tanh$ `\tanh` | +| $\ch$ `\ch` | $\ctg$ `\ctg` | $\ln$ `\ln` | $\tg$ `\tg` | +| $\cos$ `\cos` | $\cth$ `\cth` | $\log$ `\log` | $\th$ `\th` | +| $\operatorname{f}$ `\operatorname{f}` | ||| +| $\argmax$ `\argmax` | $\injlim$ `\injlim` | $\min$ `\min` | $\varinjlim$ `\varinjlim` | +| $\argmin$ `\argmin` | $\lim$ `\lim` | $\plim$ `\plim` | $\varliminf$ `\varliminf` | +| $\det$ `\det` | $\liminf$ `\liminf` | $\Pr$ `\Pr` | $\varlimsup$ `\varlimsup` | +| $\gcd$ `\gcd` | $\limsup$ `\limsup` | $\projlim$ `\projlim` | $\varprojlim$ `\varprojlim` | +| $\inf$ `\inf` | $\max$ `\max` | $\sup$ `\sup` |$\operatorname*{f}$ `\operatorname*{f}`| + + +Functions in the bottom five rows of this table can take `\limits`. + +### \sqrt + +$\sqrt{x}$ `\sqrt{x}` + +$\sqrt[3]{x}$ `\sqrt[3]{x}` + +## Relations + +$\stackrel{!}{=}$ `\stackrel{!}{=}` + +||||| +|:--------|:------------------------|:----------------------------|:------------------| +| $=$ `=` | $\doteqdot$ `\doteqdot` | $\lessapprox$ `\lessapprox` | $\smile$ `\smile` | +| $<$ `<` | $\eqcirc$ `\eqcirc` | $\lesseqgtr$ `\lesseqgtr` | $\sqsubset$ `\sqsubset` | +| $>$ `>` | $\eqcolon$ `\eqcolon` or
    `\minuscolon` | $\lesseqqgtr$ `\lesseqqgtr` | $\sqsubseteq$ `\sqsubseteq` | +| $:$ `:` | $\Eqcolon$ `\Eqcolon` or
    `\minuscoloncolon` | $\lessgtr$ `\lessgtr` | $\sqsupset$ `\sqsupset` | +| $\approx$ `\approx` | $\eqqcolon$ `\eqqcolon` or
    `\equalscolon` | $\lesssim$ `\lesssim` | $\sqsupseteq$ `\sqsupseteq` | +| $\approxcolon$ `\approxcolon` | $\Eqqcolon$ `\Eqqcolon` or
    `\equalscoloncolon` | $\ll$ `\ll` | $\Subset$ `\Subset` | +| $\approxcoloncolon$ `\approxcoloncolon` | $\eqsim$ `\eqsim` | $\lll$ `\lll` | $\subset$ `\subset` or `\sub` | +| $\approxeq$ `\approxeq` | $\eqslantgtr$ `\eqslantgtr` | $\llless$ `\llless` | $\subseteq$ `\subseteq` or `\sube` | +| $\asymp$ `\asymp` | $\eqslantless$ `\eqslantless` | $\lt$ `\lt` | $\subseteqq$ `\subseteqq` | +| $\backepsilon$ `\backepsilon` | $\equiv$ `\equiv` | $\mid$ `\mid` | $\succ$ `\succ` | +| $\backsim$ `\backsim` | $\fallingdotseq$ `\fallingdotseq` | $\models$ `\models` | $\succapprox$ `\succapprox` | +| $\backsimeq$ `\backsimeq` | $\frown$ `\frown` | $\multimap$ `\multimap` | $\succcurlyeq$ `\succcurlyeq` | +| $\between$ `\between` | $\ge$ `\ge` | $\origof$ `\origof` | $\succeq$ `\succeq` | +| $\bowtie$ `\bowtie` | $\geq$ `\geq` | $\owns$ `\owns` | $\succsim$ `\succsim` | +| $\bumpeq$ `\bumpeq` | $\geqq$ `\geqq` | $\parallel$ `\parallel` | $\Supset$ `\Supset` | +| $\Bumpeq$ `\Bumpeq` | $\geqslant$ `\geqslant` | $\perp$ `\perp` | $\supset$ `\supset` | +| $\circeq$ `\circeq` | $\gg$ `\gg` | $\pitchfork$ `\pitchfork` | $\supseteq$ `\supseteq` or `\supe` | +| $\colonapprox$ `\colonapprox` | $\ggg$ `\ggg` | $\prec$ `\prec` | $\supseteqq$ `\supseteqq` | +| $\Colonapprox$ `\Colonapprox` or
    `\coloncolonapprox` | $\gggtr$ `\gggtr` | $\precapprox$ `\precapprox` | $\thickapprox$ `\thickapprox` | +| $\coloneq$ `\coloneq` or
    `\colonminus` | $\gt$ `\gt` | $\preccurlyeq$ `\preccurlyeq` | $\thicksim$ `\thicksim` | +| $\Coloneq$ `\Coloneq` or
    `\coloncolonminus` | $\gtrapprox$ `\gtrapprox` | $\preceq$ `\preceq` | $\trianglelefteq$ `\trianglelefteq` | +| $\coloneqq$ `\coloneqq` or
   `\colonequals` | $\gtreqless$ `\gtreqless` | $\precsim$ `\precsim` | $\triangleq$ `\triangleq` | +| $\Coloneqq$ `\Coloneqq` or
    `\coloncolonequals` | $\gtreqqless$ `\gtreqqless` | $\propto$ `\propto` | $\trianglerighteq$ `\trianglerighteq` | +| $\colonsim$ `\colonsim` | $\gtrless$ `\gtrless` | $\risingdotseq$ `\risingdotseq` | $\varpropto$ `\varpropto` | +| $\Colonsim$ `\Colonsim` or
    `\coloncolonsim` | $\gtrsim$ `\gtrsim` | $\shortmid$ `\shortmid` | $\vartriangle$ `\vartriangle` | +| $\cong$ `\cong` | $\imageof$ `\imageof` | $\shortparallel$ `\shortparallel` | $\vartriangleleft$ `\vartriangleleft` | +| $\curlyeqprec$ `\curlyeqprec` | $\in$ `\in` or `\isin` | $\sim$ `\sim` | $\vartriangleright$ `\vartriangleright` | +| $\curlyeqsucc$ `\curlyeqsucc` | $\Join$ `\Join` | $\simcolon$ `\simcolon` | $\vcentcolon$ `\vcentcolon` or
   `\ratio` | +| $\dashv$ `\dashv` | $\le$ `\le` | $\simcoloncolon$ `\simcoloncolon` | $\vdash$ `\vdash` | +| $\dblcolon$ `\dblcolon` or
   `\coloncolon` | $\leq$ `\leq` | $\simeq$ `\simeq` | $\vDash$ `\vDash` | +| $\doteq$ `\doteq` | $\leqq$ `\leqq` | $\smallfrown$ `\smallfrown` | $\Vdash$ `\Vdash` | +| $\Doteq$ `\Doteq` | $\leqslant$ `\leqslant` | $\smallsmile$ `\smallsmile` | $\Vvdash$ `\Vvdash` | + +Direct Input: $= < > : ∈ ∋ ∝ ∼ ∽ ≂ ≃ ≅ ≈ ≊ ≍ ≎ ≏ ≐ ≑ ≒ ≓ ≖ ≗ ≜ ≡ ≤ ≥ ≦ ≧ ≫ ≬ ≳ ≷ ≺ ≻ ≼ ≽ ≾ ≿ ⊂ ⊃ ⊆ ⊇ ⊏ ⊐ ⊑ ⊒ ⊢ ⊣ ⊩ ⊪ ⊸ ⋈ ⋍ ⋐ ⋑ ⋔ ⋙ ⋛ ⋞ ⋟ ⌢ ⌣ ⩾ ⪆ ⪌ ⪕ ⪖ ⪯ ⪰ ⪷ ⪸ ⫅ ⫆ ≲ ⩽ ⪅ ≶ ⋚ ⪋ ⟂ ⊨ ⊶ ⊷$ `≔ ≕ ⩴` + +### Negated Relations + +$\not =$ `\not =` + +||||| +|--------------|-------------------|---------------------|------------------| +| $\gnapprox$ `\gnapprox` | $\ngeqslant$ `\ngeqslant`| $\nsubseteq$ `\nsubseteq` | $\precneqq$ `\precneqq`| +| $\gneq$ `\gneq`| $\ngtr$ `\ngtr` | $\nsubseteqq$ `\nsubseteqq` | $\precnsim$ `\precnsim`| +| $\gneqq$ `\gneqq` | $\nleq$ `\nleq` | $\nsucc$ `\nsucc`| $\subsetneq$ `\subsetneq` | +| $\gnsim$ `\gnsim` | $\nleqq$ `\nleqq` | $\nsucceq$ `\nsucceq` | $\subsetneqq$ `\subsetneqq` | +| $\gvertneqq$ `\gvertneqq` | $\nleqslant$ `\nleqslant`| $\nsupseteq$ `\nsupseteq` | $\succnapprox$ `\succnapprox`| +| $\lnapprox$ `\lnapprox` | $\nless$ `\nless` | $\nsupseteqq$ `\nsupseteqq` | $\succneqq$ `\succneqq`| +| $\lneq$ `\lneq`| $\nmid$ `\nmid` | $\ntriangleleft$ `\ntriangleleft` | $\succnsim$ `\succnsim`| +| $\lneqq$ `\lneqq` | $\notin$ `\notin` | $\ntrianglelefteq$ `\ntrianglelefteq` | $\supsetneq$ `\supsetneq` | +| $\lnsim$ `\lnsim` | $\notni$ `\notni` | $\ntriangleright$ `\ntriangleright`| $\supsetneqq$ `\supsetneqq` | +| $\lvertneqq$ `\lvertneqq` | $\nparallel$ `\nparallel`| $\ntrianglerighteq$ `\ntrianglerighteq` | $\varsubsetneq$ `\varsubsetneq` | +| $\ncong$ `\ncong` | $\nprec$ `\nprec` | $\nvdash$ `\nvdash` | $\varsubsetneqq$ `\varsubsetneqq` | +| $\ne$ `\ne` | $\npreceq$ `\npreceq` | $\nvDash$ `\nvDash` | $\varsupsetneq$ `\varsupsetneq` | +| $\neq$ `\neq` | $\nshortmid$ `\nshortmid`| $\nVDash$ `\nVDash` | $\varsupsetneqq$ `\varsupsetneqq` | +| $\ngeq$ `\ngeq`| $\nshortparallel$ `\nshortparallel` | $\nVdash$ `\nVdash` | +| $\ngeqq$ `\ngeqq` | $\nsim$ `\nsim` | $\precnapprox$ `\precnapprox`| + +Direct Input: $∉ ∌ ∤ ∦ ≁ ≆ ≠ ≨ ≩ ≮ ≯ ≰ ≱ ⊀ ⊁ ⊈ ⊉ ⊊ ⊋ ⊬ ⊭ ⊮ ⊯ ⋠ ⋡ ⋦ ⋧ ⋨ ⋩ ⋬ ⋭ ⪇ ⪈ ⪉ ⪊ ⪵ ⪶ ⪹ ⪺ ⫋ ⫌$ + +### Arrows + +|||| +|:----------|:----------|:----------| +|$\circlearrowleft$ `\circlearrowleft`|$\leftharpoonup$ `\leftharpoonup`|$\rArr$ `\rArr` +|$\circlearrowright$ `\circlearrowright`|$\leftleftarrows$ `\leftleftarrows`|$\rarr$ `\rarr` +|$\curvearrowleft$ `\curvearrowleft`|$\leftrightarrow$ `\leftrightarrow`|$\restriction$ `\restriction` +|$\curvearrowright$ `\curvearrowright`|$\Leftrightarrow$ `\Leftrightarrow`|$\rightarrow$ `\rightarrow` +|$\Darr$ `\Darr`|$\leftrightarrows$ `\leftrightarrows`|$\Rightarrow$ `\Rightarrow` +|$\dArr$ `\dArr`|$\leftrightharpoons$ `\leftrightharpoons`|$\rightarrowtail$ `\rightarrowtail` +|$\darr$ `\darr`|$\leftrightsquigarrow$ `\leftrightsquigarrow`|$\rightharpoondown$ `\rightharpoondown` +|$\dashleftarrow$ `\dashleftarrow`|$\Lleftarrow$ `\Lleftarrow`|$\rightharpoonup$ `\rightharpoonup` +|$\dashrightarrow$ `\dashrightarrow`|$\longleftarrow$ `\longleftarrow`|$\rightleftarrows$ `\rightleftarrows` +|$\downarrow$ `\downarrow`|$\Longleftarrow$ `\Longleftarrow`|$\rightleftharpoons$ `\rightleftharpoons` +|$\Downarrow$ `\Downarrow`|$\longleftrightarrow$ `\longleftrightarrow`|$\rightrightarrows$ `\rightrightarrows` +|$\downdownarrows$ `\downdownarrows`|$\Longleftrightarrow$ `\Longleftrightarrow`|$\rightsquigarrow$ `\rightsquigarrow` +|$\downharpoonleft$ `\downharpoonleft`|$\longmapsto$ `\longmapsto`|$\Rrightarrow$ `\Rrightarrow` +|$\downharpoonright$ `\downharpoonright`|$\longrightarrow$ `\longrightarrow`|$\Rsh$ `\Rsh` +|$\gets$ `\gets`|$\Longrightarrow$ `\Longrightarrow`|$\searrow$ `\searrow` +|$\Harr$ `\Harr`|$\looparrowleft$ `\looparrowleft`|$\swarrow$ `\swarrow` +|$\hArr$ `\hArr`|$\looparrowright$ `\looparrowright`|$\to$ `\to` +|$\harr$ `\harr`|$\Lrarr$ `\Lrarr`|$\twoheadleftarrow$ `\twoheadleftarrow` +|$\hookleftarrow$ `\hookleftarrow`|$\lrArr$ `\lrArr`|$\twoheadrightarrow$ `\twoheadrightarrow` +|$\hookrightarrow$ `\hookrightarrow`|$\lrarr$ `\lrarr`|$\Uarr$ `\Uarr` +|$\iff$ `\iff`|$\Lsh$ `\Lsh`|$\uArr$ `\uArr` +|$\impliedby$ `\impliedby`|$\mapsto$ `\mapsto`|$\uarr$ `\uarr` +|$\implies$ `\implies`|$\nearrow$ `\nearrow`|$\uparrow$ `\uparrow` +|$\Larr$ `\Larr`|$\nleftarrow$ `\nleftarrow`|$\Uparrow$ `\Uparrow` +|$\lArr$ `\lArr`|$\nLeftarrow$ `\nLeftarrow`|$\updownarrow$ `\updownarrow` +|$\larr$ `\larr`|$\nleftrightarrow$ `\nleftrightarrow`|$\Updownarrow$ `\Updownarrow` +|$\leadsto$ `\leadsto`|$\nLeftrightarrow$ `\nLeftrightarrow`|$\upharpoonleft$ `\upharpoonleft` +|$\leftarrow$ `\leftarrow`|$\nrightarrow$ `\nrightarrow`|$\upharpoonright$ `\upharpoonright` +|$\Leftarrow$ `\Leftarrow`|$\nRightarrow$ `\nRightarrow`|$\upuparrows$ `\upuparrows` +|$\leftarrowtail$ `\leftarrowtail`|$\nwarrow$ `\nwarrow` +|$\leftharpoondown$ `\leftharpoondown`|$\Rarr$ `\Rarr` + +Direct Input: $← ↑ → ↓ ↔ ↕ ↖ ↗ ↘ ↙ ↚ ↛ ↞ ↠ ↢ ↣ ↦ ↩ ↪ ↫ ↬ ↭ ↮ ↰ ↱↶ ↷ ↺ ↻ ↼ ↽ ↾ ↾ ↿ ⇀ ⇁ ⇂ ⇃ ⇄ ⇆ ⇇ ⇈ ⇉ ⇊ ⇋ ⇌⇍ ⇎ ⇏ ⇐ ⇑ ⇒ ⇓ ⇔ ⇕ ⇚ ⇛ ⇝ ⇠ ⇢ ⟵ ⟶ ⟷ ⟸ ⟹ ⟺ ⟼$ ↽ + +**Extensible Arrows** + +||| +|:----------------------------------------------------|:----- +|$\xleftarrow{abc}$ `\xleftarrow{abc}` |$\xrightarrow[under]{over}$ `\xrightarrow[under]{over}` +|$\xLeftarrow{abc}$ `\xLeftarrow{abc}` |$\xRightarrow{abc}$ `\xRightarrow{abc}` +|$\xleftrightarrow{abc}$ `\xleftrightarrow{abc}` |$\xLeftrightarrow{abc}$ `\xLeftrightarrow{abc}` +|$\xhookleftarrow{abc}$ `\xhookleftarrow{abc}` |$\xhookrightarrow{abc}$ `\xhookrightarrow{abc}` +|$\xtwoheadleftarrow{abc}$ `\xtwoheadleftarrow{abc}` |$\xtwoheadrightarrow{abc}$ `\xtwoheadrightarrow{abc}` +|$\xleftharpoonup{abc}$ `\xleftharpoonup{abc}` |$\xrightharpoonup{abc}$ `\xrightharpoonup{abc}` +|$\xleftharpoondown{abc}$ `\xleftharpoondown{abc}` |$\xrightharpoondown{abc}$ `\xrightharpoondown{abc}` +|$\xleftrightharpoons{abc}$ `\xleftrightharpoons{abc}`|$\xrightleftharpoons{abc}$ `\xrightleftharpoons{abc}` +|$\xtofrom{abc}$ `\xtofrom{abc}` |$\xmapsto{abc}$ `\xmapsto{abc}` +|$\xlongequal{abc}$ `\xlongequal{abc}` + +Extensible arrows all can take an optional argument in the same manner
as `\xrightarrow[under]{over}`. + +## Special Notation + +**Bra-ket Notation** + +|||| +|:----------|:----------|:----------| +|$\bra{\phi}$ `\bra{\phi}` |$\ket{\psi}$ `\ket{\psi}` |$\braket{\phi\vert\psi}$ `\braket{\phi\vert\psi}` | +|$\Bra{\phi}$ `\Bra{\phi}` |$\Ket{\psi}$ `\Ket{\psi}` || + +## Style, Color, Size, and Font + +**Class Assignment** + +`\mathbin` `\mathclose` `\mathinner` `\mathop`
+`\mathopen` `\mathord` `\mathpunct` `\mathrel` + +**Color** + +$\color{blue} F=ma$ `\color{blue} F=ma` + +Note that `\color` acts like a switch. Other color functions expect the content to be a function argument: + +$\textcolor{blue}{F=ma}$ `\textcolor{blue}{F=ma}`
+$\textcolor{#228B22}{F=ma}$ `\textcolor{#228B22}{F=ma}`
+$\colorbox{aqua}{$F=ma$}$ `\colorbox{aqua}{$F=ma$}`
+$\fcolorbox{red}{aqua}{$F=ma$}$ `\fcolorbox{red}{aqua}{$F=ma$}` + +Note that, as in LaTeX, `\colorbox` & `\fcolorbox` renders its third argument as text, so you may want to switch back to math mode with `$` as in the examples above. + +For color definition, KaTeX color functions will accept the standard HTML [predefined color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). They will also accept an RGB argument in CSS hexa­decimal style. The "#" is optional before a six-digit specification. + +**Font** + +|||| +|:------------------------------|:------------------------------|:----- +|$\mathrm{Ab0}$ `\mathrm{Ab0}` |$\mathbf{Ab0}$ `\mathbf{Ab0}` |$\mathit{Ab0}$ `\mathit{Ab0}` +|$\mathnormal{Ab0}$ `\mathnormal{Ab0}`|$\textbf{Ab0}$ `\textbf{Ab0}` |$\textit{Ab0}$ `\textit{Ab0}` +|$\textrm{Ab0}$ `\textrm{Ab0}` |$\bf Ab0$ `\bf Ab0` |$\it Ab0$ `\it Ab0` +|$\rm Ab0$ `\rm Ab0` |$\bold{Ab0}$ `\bold{Ab0}` |$\textup{Ab0}$ `\textup{Ab0}` +|$\textnormal{Ab0}$ `\textnormal{Ab0}`|$\boldsymbol{Ab0}$ `\boldsymbol{Ab}`|$\Bbb{AB}$ `\Bbb{AB}` +|$\text{Ab0}$ `\text{Ab0}` |$\bm{Ab0}$ `\bm{Ab0}` |$\mathbb{AB}$ `\mathbb{AB}` +|$\mathsf{Ab0}$ `\mathsf{Ab0}` |$\textmd{Ab0}$ `\textmd{Ab0}` |$\frak{Ab0}$ `\frak{Ab0}` +|$\textsf{Ab0}$ `\textsf{Ab0}` |$\mathtt{Ab0}$ `\mathtt{Ab0}` |$\mathfrak{Ab0}$ `\mathfrak{Ab0}` +|$\sf Ab0$ `\sf Ab0` |$\texttt{Ab0}$ `\texttt{Ab0}` |$\mathcal{AB0}$ `\mathcal{AB0}` +| |$\tt Ab0$ `\tt Ab0` |$\cal AB0$ `\cal AB0` +| | |$\mathscr{AB}$ `\mathscr{AB}` + +One can stack font family, font weight, and font shape by using the `\textXX` versions of the font functions. So `\textsf{\textbf{H}}` will produce $\textsf{\textbf{H}}$. The other versions do not stack, e.g., `\mathsf{\mathbf{H}}` will produce $\mathsf{\mathbf{H}}$. + +In cases where KaTeX fonts do not have a bold glyph, `\pmb` can simulate one. For example, `\pmb{\mu}` renders as : $\pmb{\mu}$ + +**Size** + +||| +|:----------------------|:----- +|$\Huge AB$ `\Huge AB` |$\normalsize AB$ `\normalsize AB` +|$\huge AB$ `\huge AB` |$\small AB$ `\small AB` +|$\LARGE AB$ `\LARGE AB`|$\footnotesize AB$ `\footnotesize AB` +|$\Large AB$ `\Large AB`|$\scriptsize AB$ `\scriptsize AB` +|$\large AB$ `\large AB`|$\tiny AB$ `\tiny AB` + + +**Style** + +|| +|:-------------------------------------------------------| +|$\displaystyle\sum_{i=1}^n$ `\displaystyle\sum_{i=1}^n` +|$\textstyle\sum_{i=1}^n$ `\textstyle\sum_{i=1}^n` +|$\scriptstyle x$ `\scriptstyle x`         (The size of a first sub/superscript) +|$\scriptscriptstyle x$ `\scriptscriptstyle x` (The size of subsequent sub/superscripts) +|$\lim\limits_x$ `\lim\limits_x` +|$\lim\nolimits_x$ `\lim\nolimits_x` +|$\verb!x^2!$ `\verb!x^2!` + +`\text{…}` will accept nested `$…$` fragments and render them in math mode. + +## Symbols and Punctuation + +|||| +|:----------|:----------|:----------| +|`% comment`|$\dots$ `\dots`|$\KaTeX$ `\KaTeX` +|$\%$ `\%`|$\cdots$ `\cdots`|$\LaTeX$ `\LaTeX` +|$\#$ `\#`|$\ddots$ `\ddots`|$\TeX$ `\TeX` +|$\&$ `\&`|$\ldots$ `\ldots`|$\nabla$ `\nabla` +|$\_$ `\_`|$\vdots$ `\vdots`|$\infty$ `\infty` +|$\text{\textunderscore}$ `\text{\textunderscore}`|$\dotsb$ `\dotsb`|$\infin$ `\infin` +|$\text{--}$ `\text{--}`|$\dotsc$ `\dotsc`|$\checkmark$ `\checkmark` +|$\text{\textendash}$ `\text{\textendash}`|$\dotsi$ `\dotsi`|$\dag$ `\dag` +|$\text{---}$ `\text{---}`|$\dotsm$ `\dotsm`|$\dagger$ `\dagger` +|$\text{\textemdash}$ `\text{\textemdash}`|$\dotso$ `\dotso`|$\text{\textdagger}$ `\text{\textdagger}` +|$\text{\textasciitilde}$ `\text{\textasciitilde}`|$\sdot$ `\sdot`|$\ddag$ `\ddag` +|$\text{\textasciicircum}$ `\text{\textasciicircum}`|$\mathellipsis$ `\mathellipsis`|$\ddagger$ `\ddagger` +|$`$ `|$\text{\textellipsis}$ `\text{\textellipsis}`|$\text{\textdaggerdbl}$ `\text{\textdaggerdbl}` +|$\text{\textquoteleft}$ `text{\textquoteleft}`|$\Box$ `\Box`|$\Dagger$ `\Dagger` +|$\lq$ `\lq`|$\square$ `\square`|$\angle$ `\angle` +|$\text{\textquoteright}$ `\text{\textquoteright}`|$\blacksquare$ `\blacksquare`|$\measuredangle$ `\measuredangle` +|$\rq$ `\rq`|$\triangle$ `\triangle`|$\sphericalangle$ `\sphericalangle` +|$\text{\textquotedblleft}$ `\text{\textquotedblleft}`|$\triangledown$ `\triangledown`|$\top$ `\top` +|$"$ `"`|$\triangleleft$ `\triangleleft`|$\bot$ `\bot` +|$\text{\textquotedblright}$ `\text{\textquotedblright}`|$\triangleright$ `\triangleright`|$\$$ `\$` +|$\colon$ `\colon`|$\bigtriangledown$ `\bigtriangledown`|$\text{\textdollar}$ `\text{\textdollar}` +|$\backprime$ `\backprime`|$\bigtriangleup$ `\bigtriangleup`|$\pounds$ `\pounds` +|$\prime$ `\prime`|$\blacktriangle$ `\blacktriangle`|$\mathsterling$ `\mathsterling` +|$\text{\textless}$ `\text{\textless}`|$\blacktriangledown$ `\blacktriangledown`|$\text{\textsterling}$ `\text{\textsterling}` +|$\text{\textgreater}$ `\text{\textgreater}`|$\blacktriangleleft$ `\blacktriangleleft`|$\yen$ `\yen` +|$\text{\textbar}$ `\text{\textbar}`|$\blacktriangleright$ `\blacktriangleright`|$\surd$ `\surd` +|$\text{\textbardbl}$ `\text{\textbardbl}`|$\diamond$ `\diamond`|$\degree$ `\degree` +|$\text{\textbraceleft}$ `\text{\textbraceleft}`|$\Diamond$ `\Diamond`|$\text{\textdegree}$ `\text{\textdegree}` +|$\text{\textbraceright}$ `\text{\textbraceright}`|$\lozenge$ `\lozenge`|$\mho$ `\mho` +|$\text{\textbackslash}$ `\text{\textbackslash}`|$\blacklozenge$ `\blacklozenge`|$\diagdown$ `\diagdown` +|$\text{\P}$ `\text{\P}`|$\star$ `\star`|$\diagup$ `\diagup` +|$\text{\S}$ `\text{\S}`|$\bigstar$ `\bigstar`|$\flat$ `\flat` +|$\text{\sect}$ `\text{\sect}`|$\clubsuit$ `\clubsuit`|$\natural$ `\natural` +|$\copyright$ `\copyright`|$\clubs$ `\clubs`|$\sharp$ `\sharp` +|$\circledR$ `\circledR`|$\diamondsuit$ `\diamondsuit`|$\heartsuit$ `\heartsuit` +|$\text{\textregistered}$ `\text{\textregistered}`|$\diamonds$ `\diamonds`|$\hearts$ `\hearts` +|$\circledS$ `\circledS`|$\spadesuit$ `\spadesuit`|$\spades$ `\spades` +|$\text{\textcircled a}$ `\text{\textcircled a}`|$\maltese$ `\maltese`|$\minuso$ `\minuso`| + +Direct Input: $£ ¥ ∇ ∞ · ∠ ∡ ∢ ♠ ♡ ♢ ♣ ♭ ♮ ♯ ✓ … ⋮ ⋯ ⋱ !$ ‼ ⦵ + +## Units + +In KaTeX, units are proportioned as they are in TeX.
+KaTeX units are different than CSS units. + +
+
+ +| KaTeX Unit | Value | KaTeX Unit | Value | +|:---|:---------------------|:---|:----------------| +| em | CSS em | bp | 1/72​ inch × F × G| +| ex | CSS ex | pc | 12 KaTeX pt| +| mu | 1/18 CSS em | dd | 1238/1157​ KaTeX pt | +| pt | 1/72.27 inch × F × G | cc | 14856/1157 KaTeX pt | +| mm | 1 mm × F × G | nd | 685/642 KaTeX pt | +| cm | 1 cm × F × G | nc | 1370/107​ KaTeX pt| +| in | 1 inch × F × G | sp | 1/65536 KaTeX pt | + +
+ +where: + +
+ +F = (font size of surrounding HTML text)/(10 pt) + +G = 1.21 by default, because KaTeX font-size is normally 1.21 × the surrounding font size. This value [can be overridden](font.md#font-size-and-lengths) by the CSS of an HTML page. + +
+ +The effect of style and size: + +
+ +| Unit | textstyle | scriptscript | huge | +|:------:|:-----------------:|:------------:|:------:| +|em or ex|$\rule{1em}{1em}$ |$\scriptscriptstyle\rule{1em}{1em}$ |$\huge\rule{1em}{1em}$ +| mu |$\rule{18mu}{18mu}$|$\scriptscriptstyle\rule{18mu}{18mu}$|$\huge\rule{18mu}{18mu}$ +| others |$\rule{10pt}{10pt}$|$\scriptscriptstyle\rule{10pt}{10pt}$|$\huge\rule{10pt}{10pt}$ + +
diff --git a/website/versioned_sidebars/version-0.13.0-sidebars.json b/website/versioned_sidebars/version-0.13.0-sidebars.json new file mode 100644 index 00000000..a053e40b --- /dev/null +++ b/website/versioned_sidebars/version-0.13.0-sidebars.json @@ -0,0 +1,26 @@ +{ + "version-0.13.0-docs": { + "Installation": [ + "version-0.13.0-node", + "version-0.13.0-browser" + ], + "Usage": [ + "version-0.13.0-api", + "version-0.13.0-cli", + "version-0.13.0-autorender", + "version-0.13.0-libs" + ], + "Configuring KaTeX": [ + "version-0.13.0-options", + "version-0.13.0-security", + "version-0.13.0-error", + "version-0.13.0-font" + ], + "Misc": [ + "version-0.13.0-supported", + "version-0.13.0-support_table", + "version-0.13.0-issues", + "version-0.13.0-migration" + ] + } +} diff --git a/website/versions.json b/website/versions.json index 5fe98f80..b713b1ab 100644 --- a/website/versions.json +++ b/website/versions.json @@ -1,4 +1,5 @@ [ + "0.13.0", "0.12.0", "0.11.1", "0.11.0",