Symbol table

This commit is contained in:
Martin Haug 2022-12-22 01:33:09 +01:00
parent c06d45002a
commit 947522b71a
2 changed files with 30 additions and 0 deletions

View File

@ -25,6 +25,10 @@ use crate::text::{FontFamily, LinebreakNode, SpaceNode, SymbolNode, TextNode};
/// dollar signs to create a formula. Starting and ending the formula with at
/// least one space lifts it into a separate block that is centered
/// horizontally.
///
/// Within math mode, additional shorthands are available to easily type various
/// arrows and other symbols. The page on the [`symbol`](@symbol) function lists
/// all of them.
///
/// ## Example
/// ```

View File

@ -19,6 +19,32 @@ use crate::text::TextNode;
/// the notation directly. There, all letter sequence of length at least two are
/// automatically parsed as symbols (unless a variable of that name is defined).
///
/// Additionally, some very common but hard to type symbols can be expressed with
/// dedicated shortcuts. These are:
///
/// | Symmie | Shorthand | Result |
/// | ----------- | --------- | ------ |
/// | `dots:b` | `...` | … |
/// | `dash:en` | `---` | |
/// | `dash:em` | `--` | — |
/// | none yet | `-?` | A soft hyphen |
/// | none yet | `~` | A non breaking space |
///
/// Within math mode, additional shorthands are available:
///
/// | Symmie | Shorthand | Result |
/// | ------------------ | --------- | ------ |
/// | `arrow:r` | `->` | `→` |
/// | `arrow:r:double` | `=>` | `⇒` |
/// | `arrow:l` | `<-` | `←` |
/// | `arrow:r:bar` | <code>&VerticalLine;-></code> | `↦` |
/// | `arrow:l:r` | `<->` | `↔` |
/// | `arrow:l:r:double` | `<=>` | `⇔` |
/// | `eq:not` | `!=` | `≠` |
/// | `eq:gt` | `>=` | `≥` |
/// | `eq:lt` | `<=` | `≤` |
/// | `colon:eq` | `:=` | `≔` |
///
/// ## Example
/// ```
/// // In text, with colons.