Skip to content

Commit 8807740

Browse files
committed
Add more .not variants
1 parent 21b1cd0 commit 8807740

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
### New in `sym`
66

77
- Mathematical symbols
8+
- `in.small.not`: ∊̸
9+
- `in.rev.small.not`: ∍̸
10+
- `minus.tilde.not`: ≂̸
11+
- `eq.quad.not`: ≣̸
12+
- `lt.equiv.not`: ≦̸
13+
- `gt.equiv.not`: ≧̸
14+
- `lt.eq.slant.not`: ⩽̸
15+
- `gt.eq.slant.not`: ⩾̸
816
- `subset.approx`: ⫉
917
- `subset.closed`: ⫏
1018
- `subset.closed.eq`: ⫑

build.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,23 @@ fn decode_value(mut text: &str) -> StrResult<String> {
234234
};
235235
result.push(vs);
236236
text = tail;
237+
} else if let Some(rest) = text.strip_prefix("\\c{") {
238+
let Some((value, tail)) = rest.split_once('}') else {
239+
return Err(format!(
240+
"unclosed combining character escape: \\c{{{}",
241+
rest.escape_debug(),
242+
));
243+
};
244+
let c = match value {
245+
"not" => '\u{0338}',
246+
code => {
247+
return Err(format!(
248+
"invalid combining character escape: \\c{{{code}}}",
249+
))
250+
}
251+
};
252+
result.push(c);
253+
text = tail;
237254
} else if let Some((prefix, tail)) = text.find('\\').map(|i| text.split_at(i)) {
238255
if prefix.is_empty() {
239256
return Err(format!("invalid escape sequence: {tail}"));

src/modules/sym.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ minus −
260260
.plus ∓
261261
.square ⊟
262262
.tilde ≂
263+
.tilde.not ≂\c{not}
263264
.triangle ⨺
264265
div ÷
265266
.o ⨸
@@ -302,16 +303,19 @@ eq =
302303
.triple ≡
303304
.triple.not ≢
304305
.quad ≣
306+
.quad.not ≣\c{not}
305307
gt >
306308
.o ⧁
307309
.dot ⋗
308310
.approx ⪆
309311
.double ≫
310312
.eq ≥
311313
.eq.slant ⩾
314+
.eq.slant.not ⩾\c{not}
312315
.eq.lt ⋛
313316
.eq.not ≱
314317
.equiv ≧
318+
.equiv.not ≧\c{not}
315319
.lt ≷
316320
.lt.not ≹
317321
.neq ⪈
@@ -334,9 +338,11 @@ lt <
334338
.double ≪
335339
.eq ≤
336340
.eq.slant ⩽
341+
.eq.slant.not ⩽\c{not}
337342
.eq.gt ⋚
338343
.eq.not ≰
339344
.equiv ≦
345+
.equiv.not ≦\c{not}
340346
.gt ≶
341347
.gt.not ≸
342348
.neq ⪇
@@ -413,7 +419,9 @@ in ∈
413419
.rev ∋
414420
.rev.not ∌
415421
.rev.small ∍
422+
.rev.small.not ∍\c{not}
416423
.small ∊
424+
.small.not ∊\c{not}
417425
subset ⊂
418426
.approx ⫉
419427
.closed ⫏

0 commit comments

Comments
 (0)