tex2typst 0.1.20 → 0.2.0

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.
package/dist/types.d.ts CHANGED
@@ -1,9 +1,14 @@
1
- export interface KatexParseNode {
1
+ export interface LatexParseNode {
2
2
  type: string;
3
- mode: string;
4
- text?: string;
5
- body?: KatexParseNode | KatexParseNode[] | KatexParseNode[][];
6
- loc?: any;
3
+ content?: string;
4
+ arg1?: LatexParseNode;
5
+ arg2?: LatexParseNode;
6
+ args?: LatexParseNode[];
7
+ base?: LatexParseNode;
8
+ sub?: LatexParseNode;
9
+ sup?: LatexParseNode;
10
+ exponent?: LatexParseNode;
11
+ body?: LatexParseNode | LatexParseNode[] | LatexParseNode[][];
7
12
  }
8
13
  export interface TexSupsubData {
9
14
  base: TexNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tex2typst",
3
- "version": "0.1.20",
3
+ "version": "0.2.0",
4
4
  "description": "JavaScript library for converting TeX code to Typst",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/map.ts CHANGED
@@ -19,6 +19,10 @@ export const symbolMap = new Map<string, string>([
19
19
  ['overline', 'overline'], // same
20
20
  ['underline', 'underline'], // same
21
21
  ['bar', 'macron'],
22
+ ['dbinom', 'binom'],
23
+ ['tbinom', 'binom'],
24
+ ['dfrac', 'frac'],
25
+ ['tfrac', 'frac'],
22
26
 
23
27
  ['boldsymbol', 'bold'],
24
28
  ['mathbf', 'bold'],