diff --git a/crates/typst/src/math/accent.rs b/crates/typst/src/math/accent.rs index 9ebbfc349..06fd6babd 100644 --- a/crates/typst/src/math/accent.rs +++ b/crates/typst/src/math/accent.rs @@ -45,15 +45,17 @@ pub struct AccentElem { /// | Macron | `macron` | `¯` | /// | Breve | `breve` | `˘` | /// | Dot | `dot` | `.` | - /// | Double dot | `dot.double` | `¨` | + /// | Double dot, Diaeresis | `dot.double`, `diaer` | `¨` | /// | Triple dot | `dot.triple` | | /// | Quadruple dot | `dot.quad` | | - /// | Diaeresis | `diaer` | `¨` | /// | Circle | `circle` | `∘` | /// | Double acute | `acute.double` | `˝` | /// | Caron | `caron` | `ˇ` | /// | Right arrow | `arrow`, `->` | `→` | /// | Left arrow | `arrow.l`, `<-` | `←` | + /// | Left/Right arrow | `arrow.l.r` | `↔` | + /// | Right harpoon | `harpoon` | `⇀` | + /// | Left harpoon | `harpoon.lt` | `↼` | #[required] pub accent: Accent, diff --git a/crates/typst/src/symbols/symbol.rs b/crates/typst/src/symbols/symbol.rs index 8a7707cdb..4ba603825 100644 --- a/crates/typst/src/symbols/symbol.rs +++ b/crates/typst/src/symbols/symbol.rs @@ -134,7 +134,8 @@ impl Symbol { set.into_iter() } - /// Normalize an accent to a combining one. + /// Normalize an accent to a combining one. Keep it synced with the + /// documenting table in accent.rs AccentElem. pub fn combining_accent(c: char) -> Option { Some(match c { '\u{0300}' | '`' => '\u{0300}', @@ -153,9 +154,9 @@ impl Symbol { '\u{030c}' | 'ˇ' => '\u{030c}', '\u{20d6}' | '←' => '\u{20d6}', '\u{20d7}' | '→' | '⟶' => '\u{20d7}', + '\u{20e1}' | '↔' | '⟷' => '\u{20e1}', '\u{20d0}' | '↼' => '\u{20d0}', '\u{20d1}' | '⇀' => '\u{20d1}', - '\u{20e1}' | '↔' | '⟷' => '\u{20e1}', _ => return None, }) }