mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
docs: Fix \set documentation (#3646)
Work around `|` in tables See https://github.com/facebook/docusaurus/issues/2004
This commit is contained in:
@@ -16,6 +16,8 @@ table td {
|
||||
|
||||
## Symbols
|
||||
|
||||
$\gdef\VERT{|}$
|
||||
|
||||
|Symbol/Function | Rendered | Source or Comment|
|
||||
|:---------------|:------------|:-----------------|
|
||||
|\!|$n!$|`n!`|
|
||||
@@ -192,8 +194,8 @@ table td {
|
||||
|\boxtimes|$\boxtimes$||
|
||||
|\Bra|$\Bra{\psi}$|`\Bra{\psi}`|
|
||||
|\bra|$\bra{\psi}$|`\bra{\psi}`|
|
||||
|\braket|$\braket{\phi\vert\psi}$|`\braket{\phi\vert\psi}`|
|
||||
|\Braket|$\Braket{ ϕ \| \frac{∂^2}{∂ t^2} \| ψ }$| `\Braket{ ϕ \| \frac{∂^2}{∂ t^2} \| ψ }`|
|
||||
|\braket|$\braket{\phi\VERT\psi}$|<code>\braket{\phi|\psi}</code>|
|
||||
|\Braket|$\Braket{ ϕ \VERT \frac{∂^2}{∂ t^2} \VERT ψ }$| <code>\Braket{ ϕ | \frac{∂^2}{∂ t^2} | ψ }</code>|
|
||||
|\brace|${n\brace k}$|`{n\brace k}`|
|
||||
|\bracevert|<span style="color:firebrick;">Not supported</span>||
|
||||
|\brack|${n\brack k}$|`{n\brack k}`|
|
||||
@@ -954,8 +956,8 @@ use `\ce` instead|
|
||||
|\searrow|$\searrow$||
|
||||
|\sec|$\sec$||
|
||||
|\sect|$\text{\sect}$|`\text{\sect}`|
|
||||
|\set|$\set{x\|x<5}$|`\set{x\|x<5}` |
|
||||
|\Set|$\Set{ x \| x<\frac 1 2 }$ | `\Set{ x \| x<\frac 1 2 }` |
|
||||
|\set|$\set{x\VERT x<5}$|<code>\set{x|x<5}</code> |
|
||||
|\Set|$\Set{ x \VERT x<\frac 1 2 }$ | <code>\Set{ x | x<\frac 1 2}</code> |
|
||||
|\setlength|<span style="color:firebrick;">Not supported</span>|[Issue #687](https://github.com/KaTeX/KaTeX/issues/687)|
|
||||
|\setminus|$\setminus$||
|
||||
|\sf|$\sf AaBb123$|`\sf AaBb123`|
|
||||
|
@@ -312,6 +312,8 @@ KaTeX also supports `\llap`, `\rlap`, and `\clap`, but they will take only text,
|
||||
|
||||
## Logic and Set Theory
|
||||
|
||||
$\gdef\VERT{|}$
|
||||
|
||||
|||||
|
||||
|:--------------------|:--------------------------|:----------------------------|:-----
|
||||
|$\forall$ `\forall` |$\complement$ `\complement`|$\therefore$ `\therefore` |$\emptyset$ `\emptyset`
|
||||
@@ -321,7 +323,7 @@ KaTeX also supports `\llap`, `\rlap`, and `\clap`, but they will take only text,
|
||||
|$\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`
|
||||
| | $\Set{ x \| x<\frac 1 2 }$<br>`\Set{ x \| x<\frac 1 2 }` | $\set{x\|x<5}$<br>`\set{x\|x<5}`
|
||||
| | $\Set{ x \VERT x<\frac 1 2 }$<br><code>\Set{ x | x<\frac 1 2 }</code> | $\set{x\VERT x<5}$<br><code>\set{x|x<5}</code> ||
|
||||
|
||||
Direct Input: $∀ ∴ ∁ ∵ ∃ ∣ ∈ ∉ ∋ ⊂ ⊃ ∧ ∨ ↦ → ← ↔ ¬$ ℂ ℍ ℕ ℙ ℚ ℝ
|
||||
|
||||
@@ -563,8 +565,8 @@ Extensible arrows all can take an optional argument in the same manner<br>as `\x
|
||||
|
||||
||||
|
||||
|:----------|:----------|:----------|
|
||||
|$\bra{\phi}$ `\bra{\phi}` |$\ket{\psi}$ `\ket{\psi}` |$\braket{\phi\vert\psi}$ `\braket{\phi\vert\psi}` |
|
||||
|$\Bra{\phi}$ `\Bra{\phi}` |$\Ket{\psi}$ `\Ket{\psi}` |$\Braket{ ϕ \| \frac{∂^2}{∂ t^2} \| ψ }$ `\Braket{ ϕ \| \frac{∂^2}{∂ t^2} \| ψ }`|
|
||||
|$\bra{\phi}$ `\bra{\phi}` |$\ket{\psi}$ `\ket{\psi}` |$\braket{\phi\VERT\psi}$ <code>\braket{\phi|\psi}</code> |
|
||||
|$\Bra{\phi}$ `\Bra{\phi}` |$\Ket{\psi}$ `\Ket{\psi}` |$\Braket{ ϕ \VERT \frac{∂^2}{∂ t^2} \VERT ψ }$ <code>\Braket{ ϕ | \frac{∂^2}{∂ t^2} | ψ }</code>|
|
||||
|
||||
## Style, Color, Size, and Font
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// https://github.com/bradhowes/remarkable-katex/blob/master/index.js
|
||||
// Modified here to require("../..") instead of require("katex")
|
||||
// and add options {trust: true, strict: false}.
|
||||
// and add options {trust: true, strict: false, macros}.
|
||||
|
||||
/* MIT License
|
||||
|
||||
@@ -25,6 +25,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
const macros = {}; // allow sharing macros within a page
|
||||
|
||||
/**
|
||||
* Plugin for Remarkable Markdown processor which transforms $..$ and $$..$$ sequences into math HTML using the
|
||||
* Katex package.
|
||||
@@ -41,7 +43,7 @@ module.exports = (md, options) => {
|
||||
*/
|
||||
const renderKatex = (source, displayMode) => katex.renderToString(source,
|
||||
{displayMode: displayMode, throwOnError: false,
|
||||
trust: true, strict: false});
|
||||
trust: true, strict: false, macros});
|
||||
|
||||
/**
|
||||
* Parse '$$' as a block. Based off of similar method in remarkable.
|
||||
|
Reference in New Issue
Block a user