tex2typst 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  const shorthandMap = new Map<string, string>([
2
+ // The following snippet is generated with tools/make-short-hand-map.py
2
3
  ['arrow.l.r.double.long', '<==>'],
3
4
  ['arrow.l.r.long', '<-->'],
4
5
  ['arrow.r.bar', '|->'],
@@ -13,7 +14,6 @@ const shorthandMap = new Map<string, string>([
13
14
  ['arrow.l.long.squiggly', '<~~'],
14
15
  ['arrow.l.tail', '<-<'],
15
16
  ['arrow.l.twohead', '<<-'],
16
- ['arrow.l.r', '<->'],
17
17
  ['arrow.l.r.double', '<=>'],
18
18
  ['colon.double.eq', '::='],
19
19
  ['dots.h', '...'],
@@ -25,8 +25,8 @@ const shorthandMap = new Map<string, string>([
25
25
  ['arrow.l', '<-'],
26
26
  ['arrow.l.squiggly', '<~'],
27
27
  ['bar.v.double', '||'],
28
- ['bracket.l.double', '[|'],
29
- ['bracket.r.double', '|]'],
28
+ ['bracket.l.stroked', '[|'],
29
+ ['bracket.r.stroked', '|]'],
30
30
  ['colon.eq', ':='],
31
31
  ['eq.colon', '=:'],
32
32
  ['eq.not', '!='],
@@ -37,6 +37,9 @@ const shorthandMap = new Map<string, string>([
37
37
  ['ast.op', '*'],
38
38
  ['minus', '-'],
39
39
  ['tilde.op', '~'],
40
+
41
+ // Typst's documentation doesn't include this. Wondering why
42
+ ['arrow.l.r', '<->'],
40
43
  ]);
41
44
 
42
45
 
@@ -57,7 +57,7 @@ export class TypstToken {
57
57
  new TypstToken(TypstTokenType.ELEMENT, '['),
58
58
  new TypstToken(TypstTokenType.ELEMENT, '{'),
59
59
  new TypstToken(TypstTokenType.ELEMENT, '|'),
60
- new TypstToken(TypstTokenType.SYMBOL, 'angle.l'),
60
+ new TypstToken(TypstTokenType.SYMBOL, 'chevron.l'),
61
61
  new TypstToken(TypstTokenType.SYMBOL, 'paren.l'),
62
62
  new TypstToken(TypstTokenType.SYMBOL, 'brace.l'),
63
63
  ];
@@ -67,7 +67,7 @@ export class TypstToken {
67
67
  new TypstToken(TypstTokenType.ELEMENT, ']'),
68
68
  new TypstToken(TypstTokenType.ELEMENT, '}'),
69
69
  new TypstToken(TypstTokenType.ELEMENT, '|'),
70
- new TypstToken(TypstTokenType.SYMBOL, 'angle.r'),
70
+ new TypstToken(TypstTokenType.SYMBOL, 'chevron.r'),
71
71
  new TypstToken(TypstTokenType.SYMBOL, 'paren.r'),
72
72
  new TypstToken(TypstTokenType.SYMBOL, 'brace.r'),
73
73
  ];