mirror of
https://github.com/typst/typst
synced 2025-05-21 20:45:27 +08:00
Period and slash are ordinary characters in math (#1855)
This commit is contained in:
parent
ad55755f33
commit
ba0990f189
@ -216,7 +216,7 @@ impl GlyphFragment {
|
||||
pub fn with_id(ctx: &MathContext, c: char, id: GlyphId, span: Span) -> Self {
|
||||
let class = match c {
|
||||
':' => Some(MathClass::Relation),
|
||||
'⋯' | '⋱' | '⋰' | '⋮' => Some(MathClass::Normal),
|
||||
'.' | '/' | '⋯' | '⋱' | '⋰' | '⋮' => Some(MathClass::Normal),
|
||||
_ => unicode_math_class::class(c),
|
||||
};
|
||||
let mut fragment = Self {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 6.3 KiB |
@ -31,3 +31,7 @@ $ a dotsq b \
|
||||
#let normal = math.class.with("normal")
|
||||
#let pluseq = $class("binary", normal(+) normal(=))$
|
||||
$ a pluseq 5 $
|
||||
|
||||
---
|
||||
// Test exceptions.
|
||||
$ sqrt(3)\/2 quad d_0.d_1d_2 dots $
|
@ -42,10 +42,13 @@ $ mat(
|
||||
|
||||
---
|
||||
// Test #460 equations.
|
||||
#let stop = {
|
||||
math.class("punctuation",$.$)
|
||||
}
|
||||
$ mat(&a+b,c;&d, e) $
|
||||
$ mat(&a+b&,c;&d&, e) $
|
||||
$ mat(&&&a+b,c;&&&d, e) $
|
||||
$ mat(.&a+b&.,c;.....&d&....., e) $
|
||||
$ mat(stop &a+b&stop,c;...stop stop&d&...stop stop, e) $
|
||||
|
||||
---
|
||||
// Test #454 equations.
|
||||
|
Loading…
x
Reference in New Issue
Block a user