summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/math/mod.rs4
-rw-r--r--library/src/text/symbol.rs26
2 files changed, 30 insertions, 0 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 6e6c4104..30fbe910 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -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
/// ```
diff --git a/library/src/text/symbol.rs b/library/src/text/symbol.rs
index a59461a7..4a7c8ad3 100644
--- a/library/src/text/symbol.rs
+++ b/library/src/text/symbol.rs
@@ -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.